DynaPDF Manual - Page 667
Previous Page 666 Index Next Page 668
Function Reference
Page 667 of 839
ResizeBitmap (Rendering Engine)
Syntax:
LBOOL rasResizeBitmap(
IRAS* RasPtr,
// Pointer of the rasterizer
const void* DC, // Device Context (HDC)
UI32 Width,
// New width in pixels
UI32 Height)
// New height in pixels
The function changes the size of the internal image buffer that was created with
CreateRasterizerEx(). The function should be called in the OnResize() event of the form or
component into which the page is rendered.
The new width and height must greater zero.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
RestoreGraphicState
Syntax:
LBOOL pdfRestoreGraphicState(
const PPDF* IPDF) // Instance pointer
The function restores a previously saved graphics state. A PDF viewer application maintains an
internal data structure called the graphics state that holds current graphics control parameters. These
parameters define the global framework within which the graphics operators execute.
A well-structured PDF document typically contains many graphical elements that are essentially
independent of each other and sometimes nested to multiple levels. The graphics state stack allows
these elements to make local changes to the graphics state without disturbing the graphics state of
the surrounding environment. The stack is a LIFO (last in, first out) data structure in which the
contents of the graphics state can be saved and later restored using the following functions:
• SaveGraphicState() pushes a copy of the entire graphics state onto the stack.
• RestoreGraphicState() restores the entire graphics state to its former value by popping it
from the stack.
These functions can be used to encapsulate a graphical element so that it can modify parameters of
the graphics state and later restore them to their previous values.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
Previous topic: ResetAnnotAP, ResetEncryptionSettings, ResetLineDashPattern
Next topic: RotateCoords