Xojo Conferences
MBSOct2019CologneDE

DynaPDF Manual - Page 724

Previous Page 723   Index   Next Page 725

Function Reference
Page 724 of 770
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetTabLen
Syntax:
LBOOL pdfSetTabLen(
const PPDF* IPDF, // Instance pointer
SI32 TabLen)
// New tabulator length in number of spaces
The function sets the tabulator length, specified in number of spaces, which will be used to emulate
tabulators during text formatting (see WriteFText() for further information).
Because tabulators are emulated with spaces they have no fixed with. The width of a tabulator
depends on the width of the space character of the active font.
Default value = 3 (min = 1, max = 256)
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetTextDrawMode
Syntax:
LBOOL pdfSetTextDrawMode(
const PPDF* IPDF, // Instance pointer
TDrawMode Mode)
// see below
typedef enum
{
dmNormal
= 0, // Default
dmStroke
= 1, // Stroke the text (outlines only)
dmFillStroke
= 2, // Fill and stroke the text
dmInvisible
= 3, // Neither fill nor stroke text (invisible)
dmFillClip
= 4, // Fill text and add to path for clipping
dmStrokeClip
= 5, // Stroke text and add to path for clipping
dmFillStrokeClip = 6, // Fill & stroke text and add to path for clipping
dmClipping
= 7
// Add the text to path for clipping
}TDrawMode;
The text draw mode specifies how text should be rendered. Texts can be used as clipping paths such
as normal vector graphics; however, the usage is not the same. To use a text as clipping path save the
graphics state, set the text draw mode to a clipping mode, paint the objects which should be clipped
into the path and restore the graphics state.
Note that the functions BeginClipPath() and ClipPath() can not be used to define a text as clipping
path (see the example below).
Default value = dmNormal
 

Previous topic: SetStrokeColorF, SetStrokeColorSpace

Next topic: How to use text as clipping path?