DynaPDF Manual - Page 269

Previous Page 268   Index   Next Page 270

Function Reference
Page 269 of 787
to allocate the image in the largest size that a user can request, e.g. in a viewer application. The
image can be reallocated in the required size and attached to the rasterizer whenever necessary.
The pixel format is directly connected with the rasterizer and cannot be changed at runtime. When
the pixel format must be changed then delete the rasterizer and create a new one in that pixel
format.
The image buffer can be either defined as one large memory block or as an array of scanlines. When
it was allocated as one large block then set the parameter Rows to NULL and pass the buffer to the
parameter Buffer. If the scanlines were allocated separately or in blocks then use the parameter Rows
instead. One of these parameters must be set but never both. The function checks first whether the
parameter Rows is present.
The rasterizer requires no special alignment of the scanlines, the scanlines can be byte aligned.
However, the scaline length can be longer than necessary, e.g. due to aligment requirements of
certain image formats like Windows Bitmaps. A negative value of the scanline length mirrors the
image vertically.
The pointer of a PDF instance is required because the rasterizer uses the error log of the PDF
instance to output warnings and errors.
The return value of the function is a pointer to the rasterizer object. This pointer is required in
functions like RenderPage().
Remarks:
The rasterizer uses the error log of the PDF instance to output warnings and error messages but it
does never raise PDF exceptions. So, an error that occurs during rendering does not affect the PDF
file in memory.
Return values:
When the function succeeds the return value is the pointer of the rasterizer object. If the function
fails the return value is NULL.
CreateRasterizerEx (Rendering Engine)
Syntax:
IRAS* rasCreateRasterizerEx(
const PPDF* IPDF,
// Instance pointer
const void* DC,
// Device Context (HDC)
UI32 Width,
// Width in Pixel
UI32 Height,
// Height in Pixel
TPDFPixFormat PixFmt) // Wished pixel format
The function creates a new instance of a rasterizer. The caller is responsible to release the rasterizer
when finish with DeleteRasterizer().
 

Previous topic: CreateRasterizer (Rendering Engine)

Next topic: CreateRectilinearMeasure

Start Chat