DynaPDF Manual - Page 835
Previous Page 834 Index Next Page 836
Function Reference
Page 835 of 860
Return values:
If the function succeeds the return value is the annotation handle, a value greater or equal zero. If
the function fails the return value is a negative error code.
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
Previous topic: TextAnnot
Next topic: TranslateString (obsolete)