DynaPDF Manual - Page 672
Previous Page 671 Index Next Page 673
Function Reference
Page 672 of 839
Parameter
Data type
Initial Value
StrokePattern
IPattern*
NULL
TextDrawMode
TDrawMode
dmNormal
TextScale
float
100.0f
WordSpacing
float
0.0f
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
ScaleCoords
Syntax:
LBOOL pdfScaleCoords(
const PPDF* IPDF, // Instance pointer
double sx,
// Scale factor of the x-axis
double sy)
// Scale factor of the y-axis
The function scales the coordinate system by applying a transformation matrix. It is highly
recommended to save the graphics state beforehand, otherwise it is very difficult or impossible to
restore the coordinate system later.
After scaling the coordinate system, bottom-up coordinates are active. It is not possible to use top-
down coordinates inside a scaled coordinate system.
The parameters sx and sy are set directly to a and d members of the transformation matrix:
TCTM M; // Transformation matrix, the data type is declared in dynapdf.h
M.a = sx;
M.b = 0.0;
M.c = 0.0;
M.d = sy;
M.x = 0.0;
M.y = 0.0;
The parameters sx and sy must not be zero.
Remarks:
If the graphics state was not saved beforehand the function produces a warning but the
transformation is applied.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
Previous topic: SaveGraphicState
Next topic: SelfTest, Set3DAnnotProps