...
SetColor()
Sets the foreground and background drawing colors.
Syntax:
Code Block |
---|
XFRXDraw::SetColor(tfr, tfg, tfb[, tbr, tbg, tbb]) |
Parameters:
tfr, tfg, tfb
Red, green and blue components of the foreground color
tbr, tbg, tbb
Red, green and blue components of the background color (optional)
...
SetFont()
Sets font name and attributes for subsequent DrawText() or DrawTextBox() calls.
Syntax:
Code Block |
---|
...
Object.SetFont(tcFontName, tnSize [, tlBold [, tlItalic [, tlUnderline [, tlStrikeThrough]]]]) Watermark.SetFont(tcFontName [, tnSize [, tcFontSTYLE [, tiFontEmbedded]]]) PDFL.SetFont(tcFontName, tnSize [, tlBold |
...
[, tlItalic |
...
[, tlUnderline [, tnEmbed [, lnCodePage [, tlStrikeThrough]]]]]]) |
Parameters
...
tcFontName
The font name
tnSize
The font size in points
tlBold, tlItalics, tlUnderline, tlStrikeThrough
The font attributes. These parameters are optional, the default value is .F. Parameter tlStrikeThrough is since XFRX 15.7
...
SetPos()
Sets the position where the text will be drawn by the subsequent DrawText() method call.
Syntax:
Code Block |
---|
XFRXDraw::SetPos(tnXPos, tnYPos) |
Parameters:
tnXPos, tnYPos
The X and Y (horizontal and vertical) coordinates of the position. The unit of the coordinates is defined by SetUnit() method, the default unit is Point (pt).
...
SetUnit()
Sets the drawing units.
Syntax:
Code Block |
---|
XFRXDraw::SetUnit(tcUnit) |
Parameters:
tcUnit
The unit code. The allowed values are: “in” – inches, “cm” – centimeters, “pt” – points and “px” – pixels.
...
lcFontStyle
Font style for watermark text. Can be empty or one of the following values or combinations. Default value is 'N'.
Value | Description |
---|---|
'B' | Bold |
'I' | Italic |
'S' | Underline |
'U' | StrikeThrough |
'N' | Normal |
tiFontEmbedded / tnEmbed
Font embedding.
Value | Description |
---|---|
0 | Font will not be embedded (default value). |
1 | Font will be included as subset. |
2 | Font will be included as all characters. |
3 | Font will be included as UNICODE subset . |
lnCodePage
Code page.
Remarks
Applies To: XFRX#DRAW, XFRX#XML, XFRX#WATERMARK, WATERMARK-Text Object, PDFL#INIT
Examples
Code Block | ||
---|---|---|
| ||
* after calls loSession.SetParams()
m.loWM=EVALUATE([xfrx("XFRX#WATERMARK", m.loSession)])
m.loWM.SetText("W A T E R M AR K")
m.loWM.SetFont("Tahoma", 15, "B")
|