DynaPDF Manual - Page 700

Previous Page 699   Index   Next Page 701

Function Reference
Page 700 of 770
LBOOL pdfSetMatrix(
const PPDF* IPDF,
// Instance pointer
struct TCTM* Matrix) // Transformation matrix
struct TCTM
double a;
double b;
double c;
double d;
double x;
double y;
The function left multiplies the current transformation matrix with the new one. The transformation
matrix is part of the graphics state. When changing the coordinate system it is usually best to save
the graphics state beforehand with SaveGraphicState(). This makes it possible to restore the
coordinate system with RestoreGraphicState().
The native coordinate system in PDF is bottom up. Changing the base coordinate system with
SetPageCoords() to top down results in a mirrored coordinate system that is applied with the current
transformation matrix. DynaPDF makes sure that text functions and so on produce correct results in
the mirrored coordinate system.
However, when multiplying a new matrix with the already changed transformation matrix
DynaPDF must set the base coordinate system back to bottom up after multiplying the matrices. This
is required because multiplying the transformation matrix again with another one would otherwise
produce incorrect results.
Matrix multiplications and every other transformation of the coordinate system should always be
applied in bottom up coordinates. It is the only way to avoid side effects when changing the
coordinate system arbitrary often.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
void pdfSetMaxErrLogMsgCount(
const PPDF* IPDF, // Instance pointer
UI32 Value)
// New limit

Previous topic: SetLinkHighlightMode, SetListFont

Next topic: SetMaxFieldLen, SetMetaConvFlags