DynaPDF Manual - Page 639
Previous Page 638 Index Next Page 640
Page 639 of 821
• ResizeBitmap() can be used to change the size of the pixel buffer that was created with
CreateRasterizerEx(). This function is normally called in the OnResize() event of the form or
component into which the image is drawn.
• Redraw() can be used to redraw the image on an arbitrary position. This function is required
to achieve flicker free scrolling when CreateRasterizerEx() was used to create the image
It is of course also possible to allocate the image manually and to attach it to a rasterizer that was
created with CreateRasterizer(). However, the image buffer should be created with the system
function CreateDIBSection() because SetDIBitsToDevice() fails sometimes when the buffer was
allocated with malloc or new.
The parameters DestX and DestY are passed to SetDIBitsToDevice() when the window is updated.
The coordinates can be changed at runtime when RenderPageEx() is executed in a separate thread.
This makes it possible to move the image aroud while it is rendered. Each time the position was
changed the function updates the entire window to avoid artifacts on screen. The destination
coordinates can be set to NULL if not required. The destination coordinate are assumed to be 0, 0 in
The OnUpdateWindow() callback function is never excuted when rendering into a device context.
However, the members UpdateOnPathCount and UpdateOnImageCoverage should be initialized as
usual so that the window becomes updated from time to time. See RenderPage() for further
At time of publication the function can be used on Windows only.
When the page was fully rendered the return value is 1. When the page was not fully processed, e.g.
due to errors, the return value is 0.
RenderPageToImage (Rendering Engine)
const PPDF* IPDF,
// PDF Instance pointer
// Page number (numbering starts at 1)
const char* OutFile,
// Output file name or NULL
// Output resolution or 0
// Output width, 0, or -maxWidth
// Output height, 0, or -maxHeight
// See RenderPage()
// Output pixel format
// See below
// See below
Previous topic: RenderPageEx (Rendering Engine)
Next topic: 1 Bit Rendering, Dithering