DynaPDF Manual - Page 763

Previous Page 762   Index   Next Page 764

Function Reference
Page 763 of 787
TranslateCoords
Syntax:
LBOOL pdfTranslateCoords(
const PPDF* IPDF, // Instance pointer
double OriginX,
// New coordinate origin of the x-axis
double OriginY)
// New coordinate origin of the y-axis
The function translates the coordinate system to the new origin OriginX, OriginY. Save the graphics
state beforehand and restore it when finish.
After the coordinate system was changed by the function, bottom-up coordinates are active. It is not
possible to use top-down coordinates with a transformed coordinate system.
Remarks:
If the graphics state was not saved beforehand the function set a warning but the transformation
will be applied.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0. Use an error
callback function or check whether an error occurred with the function GetErrorMessage(). See
Exception handling for further information.
TranslateRawCode (Font API)
Syntax:
UI32 fntTranslateRawCode(
const void* IFont,
// Pointer of the active font
const BYTE* Text,
// Raw text to be converted
UI32 Len,
// Text length in bytes
double ADDR Width,
// The width of the character
UI16 OutText[32],
// Static Unicode output buffer
SI32 ADDR OutLen,
// Number of characters copied to OutText
LBOOL ADDR Decoded, // If false, Width, OutText, OutLen must be ignored
float CharSpacing,
// Current character spacing
float WordSpacing,
// Current word spacing
float TextScale)
// Current text scaling
The function converts a source character to Unicode. The code length of a character depends on the
font's encoding. PDF supports encodings with fixed and variable code lengths from one through
four bytes per character. The return value is the number of bytes which were consumed to convert
the character to Unicode; this value must be used to increment the text pointer and to decrement the
remaining text length.
The resulting Unicode character or sequence is stored in the parameter OutText, as well as the
corresponding output text length and the character width.
 

Previous topic: TextAnnot

Next topic: TranslateString (obsolete)

Start Chat