AddTextOnPath

New in version 5.0

AddTextOnPath ( pathData ;​ text ;​ font ;​ size ;​ style ;​ color ;​ hAlignment ;​ textWidthMax ;​ textHeightMax ;​ ellipsisPosition ;​ shadowEffect ;​ shadowColor )

Argument Type Range Default Note
pathData num[] -inf..+inf (required)
text styt 0..10000 "" Max. 10000 chars.
font str 0..1000 ApplFont
size num 0..1000 9 Dimension:[pt]
style int 0..7 plain
color rgba 0..255 black
hAlignment int 1..3 left
textWidthMax num -1..10000 -1 Dimension:[pt]
textHeightMax num -1..10000 -1 Dimension:[pt]
ellipsisPosition int 0..4 3
shadowEffect num[] -1000..1000 0
shadowColor rgba 0..255 #888a
Description

Underline style, gradient color and background color are not supported in combination with function AddTextOnPath().

ADD_TEXT_ON_PATH_01
1

OpenDrawing(300;​100)

2

AddTextOnPath(M 10 85 C 150 0 150 100 292 20;​

3

"Lorem ipsum dolor sit amet consectetur.";​

4

Verdana;​13;​bold;​darkRed)

5

CloseDrawing()

ADD_TEXT_ON_PATH_01
ADD_TEXT_ON_PATH_02
1

OpenDrawing(200;​80)

2

AddTextOnPath(M 20 80 A 180 80 80 60 0 0 1;​

3

"<span size=20>L</span>orem ipsum dolor sit amet.";​

4

Verdana;​12;​bold;​steelBlue;​center)

5

CloseDrawing()

ADD_TEXT_ON_PATH_02
ADD_TEXT_ON_PATH_03
1

OpenDrawing(200;​200)

2

AddTextOnPath(M 30 110 A 170 110 70 70 0 1 1;​

3

"LOREM IPSUM";​

4

Arial;​30;​bold;​darkRed;​center;​-1;​-1;​;​2 2 2;​lightGray)

5

AddTextOnPath(M 20 100 A 180 100 80 80 0 1 0;​

6

"Lorem ipsum dolor.";​

7

Verdana;​20;​plain;​steelBlue;​center)

8

CloseDrawing()

ADD_TEXT_ON_PATH_03

When setting a maximum width, i.e. textWidthMax > 0, a longer multi-line text can be issued as continuous text with automatic word wraparound. The height of the text block can be controlled by the argument textHeightMax. Texts which do not completely fit into the area predefined by textWidthMax and textHeightMax will be shortened according to the setting by the argument ellipsisPosition. 5 options are available:

ellipsisPosition Truncation Ellipsis
0 end (No ellipsis)
1 begin ...text
2 middle text...text
3 end text... (Default)
4 begin + end ...text...

As the default, textWidthMax =​ –1 and textHeightMax =​ –1 are set, i.e. no width and height constraints and, thus, no automatic word wraparound support.

ADD_TEXT_ON_PATH_04
1

OpenDrawing(200;​200)

2

AddTextOnPath(M 20 180 C 50 100 150 100 180 20;​

3

"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt";​

4

Verdana;​12.5;​bold;​steelBlue;​center;​250;​40;​3;​2 2 3;​lightGray)

5

CloseDrawing()

ADD_TEXT_ON_PATH_04

For further information, e.g. styled texts, hyphenation, please refer to Texts.

Scroll to Top