Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 706

Previous Page 705   Index   Next Page 707

Function Reference
Page 706 of 750
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
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
Draw Mode
Description
dmNormal
Default, render the text in the usual way. The fill color is used as the text's
color.
dmStroke
Tread the glyph outlines as path to be stroked. The current line width and
stroke color are used to paint the path.
dmFillStroke
Tread the glyph outlines as path to be stroked and filled. The current line
width, fill color, and stroke color are used to paint the path.
dmInvisible
Neither fill nor stroke the text, the text is invisible.
 

Previous topic: SetTabLen

Next topic: How to use text as clipping path?