DynaPDF Manual - Page 655

Previous Page 654   Index   Next Page 656

Function Reference
Page 655 of 839
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
buffer.
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
this case.
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
information.
Remarks:
At time of publication the function can be used on Windows only.
Return values:
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)
Syntax:
LBOOL pdfRenderPageToImage(
const PPDF* IPDF,
// PDF Instance pointer
UI32 PageNum,
// Page number (numbering starts at 1)
const char* OutFile,
// Output file name or NULL
UI32 Resolution,
// Output resolution or 0
SI32 Width,
// Output width, 0, or -maxWidth
SI32 Height,
// Output height, 0, or -maxHeight
TRasterFlags Flags,
// See RenderPage()
TPDFPixFormat PixFmt,
// Output pixel format
TCompressionFilter Filter,
// See below
TImageFormat Format)
// See below
 

Previous topic: RenderPageEx (Rendering Engine)

Next topic: 1 Bit Rendering, Dithering