DynaPDF Manual - Page 292

Previous Page 291   Index   Next Page 293

Function Reference
Page 292 of 839
It is not possible to add an action to a radio button field. Actions must be added to the check boxes
which are included in the radio button. The handle of the first check box can be calculated by
adding 1 to the handle value of the radio button field. For example, if the handle of the radio button
is 1, then the handle of the first check box is 2.
Return values:
If the function succeeds the return value is the handle of the radio button, a value greater or equal
zero. If the function fails the return value is a negative error code.
CreateRasterizer (Rendering Engine)
IRAS* rasCreateRasterizer(
const PPDF* IPDF,
// PDF Instance pointer
BYTE** Rows,
// Pointer to a row buffer or alternatively
BYTE* Buffer,
// Pointer to an image buffer that was allocated
// as one large buffer.
UI32 Width,
// Width in Pixel
UI32 Height,
// Height in Pixel
SI32 ScanlineLen,
// Scanline length in bytes
TPDFPixFormat PixFmt) // Pixel format in which the buffer is defined
typedef enum
pxf1Bit, // Defined for future use, not supported yet.
pxfGray, // 8 Bit gray
// RGB
// BGR -> Pixel format for Windows Bitmaps
pxfRGBA, // RGBA
pxfBGRA, // BGRA -> Pixel format for Windows Bitmaps
pxfARGB, // ARGB
pxfCMYK, // CMYK
The function creates a new instance of a rasterizer. The caller is responsible to release the rasterizer
when finish with DeleteRasterizer().
The rasterizer renders objects, e.g. a PDF page (see RenderPage()), into the supplied image buffer.
Once the object was rendered, the result can be displayed on screen or saved on disk in an
appropriate image format.
The image buffer can be changed if necessary with AttachImageBuffer(). This can be useful when
the size of the image must be changed, e.g. when the user changes the window size. The overhead to
attach a larger or smaller image buffer is minimal, and hence, very fast. So, it is mostly not required

Previous topic: CreateRadioButton

Next topic: CreateRasterizerEx (Rendering Engine)