<< Click to Display Table of Contents >> Embedded Flag-Setting |
VPE knows many flags and settings for text-output. To reduce development time and the code-size of your EXE, most of the settings cannot be done only by calling functions, but by embedding them within the text you want to output.
Example:
You want to print the text "Hello, World!" in bold and italic. The string you would supply to one of the text-output functions would be:
"[B I]Hello, World!"
Remarks:
The "[" will only be interpreted at the very first position within the string. All following characters will be interpreted as flag-settings, until a "]" is encountered. A "[[" sequence will be interpreted as one "[" that will be printed.
Avoid using NoHold of the embedded flags, it eats a lot of performance (as the parsing of the embedded flags, too). To gain maximum performance we suggest not to use the embedded flags at all. If performance is not an issue, they are of course a very comfortable way to modify properties.
You can turn the Embedded Flag Parser off, so text beginning with a "[" will not be interpreted as embedded flags. Instead the "[" and all following text will be inserted into the document. See the property EmbeddedFlagParser in the Reference Manuals.
The flags:
Each flag can be given in a long or a short form. Uppercase or lowercase-forms are not significant, i.e., "NoHold" can also be written as "nOhoLd". Some flags must be followed by one or more numeric parameters.
The following fixed colors are defined and can be used as parameters for the color-flag settings:
Black, |
DkGray, |
Gray, |
LtGray, |
White |
DkRed, |
Red, |
LtRed |
|
|
DkOrange, |
Orange, |
LtOrange |
|
|
DkYellow, |
Yellow, |
LtYellow |
|
|
DkGreen, |
Green, |
LtGreen, |
HiGreen, |
BlueGreen |
Olive, |
Brown |
|
|
|
DkBlue, |
Blue, |
LtLtBlue, |
HiBlue, |
Cyan |
DkPurple, |
Purple, |
Magenta |
|
|
NoHold, N
If used, this flag must be used as the first in the sequence. This means that the setting is not permanently stored within the engine. If you don’t use this flag, all further output-calls will use the settings you have specified.
Avoid using NoHold of the embedded flags, it eats a lot of performance.
PenSize, PS <pensize>
Sets the pensize. <pensize> is the size of the pen in the current units, i.e. in cm, inch or 1/10mm – depending on the setting for the property UnitTransformation. You can also use double values, e.g. "PS 0.001".
PenColor, PC <color-name>
Sets the pencolor. <color-name> is one of the color-strings above.
PenColorRGB, PCRGB <red> < green> <blue>
Sets the pencolor with RGB-values <red> < green> <blue>. Example: "PCRGB 200 210 30”
PSSolid, PSS
Sets the pen to solid drawing mode.
PSDash, PSDA
Sets the pen to dash drawing mode.
PSDot, PSDO
Sets the pen to dot drawing mode.
PSDashDot, PSDADO
Sets the pen to dash-dot drawing mode.
PSDashDotDot, PSDADODO
Sets the pen to dash-dot-dot drawing mode.
BkgColor, BC <color-name>
Sets the background color. <color-name> is one of the color-strings above.
BkgColorRGB, BCRGB <red> < green> <blue>
Sets the background color with RGB-values of <red> < green> <blue>.
Transparent, T
Sets the background mode to transparent.
TransparentOff, TO
Sets the background mode to solid.
GradientLine, GRDL
Sets the background mode to gradient line.
GradientRect, GRDR
Sets the background mode to gradient rect.
GradientEllipse, GRDE
Sets the background mode to gradient ellipse.
GradientTwoColor, GRDTWO <color-name>
Use 2-color gradient (gradient from start color to end color).
GradientTriColor, GRDTRI <color-name>
Use 3-color gradient (gradient from start color over middle color to end color).
GradientStartColor, GRDSC <color-name>
Sets the gradient start color. <color-name> is one of the color-strings above.
GradientStartColorRGB, GRDSC <red> < green> <blue>
Sets the gradient start color with RGB-values of <red> < green> <blue>.
GradientMiddleColor, GRDMC <color-name>
Sets the gradient middle color. <color-name> is one of the color-strings above.
GradientMiddleColorRGB, GRDMCRGB <red> < green> <blue>
Sets the gradient middle color with RGB-values of <red> < green> <blue>.
GradientEndColor, GRDEC <color-name>
Sets the gradient end color. <color-name> is one of the color-strings above.
GradientEndColorRGB, GRDECRGB <red> < green> <blue>
Sets the gradient end color with RGB-values of <red> < green> <blue>.
HSNone, HSN
HSHorizontal, HSH
HSVertical, HSV
HSFDiagonal, HSFD
HSBDiagonal, HSBD
HSCross, HSC
HSDiagCross, HSDC
Sets the hatch-style.
HatchColor, HC <color-name>
Sets the hatchcolor. <color-name> is one of the color-strings above.
HatchColorRGB, HCRGB <red> < green> <blue>
Sets the hatchcolor with RGB-values <red> < green> <blue>. Example: "HCRGB 200 210 30”
‘ [it’s a single quote!]
Use the font specified within single quotes. Example: [ 'Arial' ]
FontSize, S <fontsize>
Sets the fontsize. <fontsize> is the size of the font in points (NOT 1/10mm!).
Color, C <color-name>
Sets the text color. <color-name> is one of the color-strings above.
ColorRGB, RGB <red> < green> <blue>
Sets the text color with RGB-values of <red> < green> <blue>.
Justified, J
Sets the text alignment to justified.
Right, R
Sets the text alignment to right.
Left, L
Sets the text alignment to left.
Center, CE
Sets the text alignment to centered.
AutoBreak, A
Sets the AutoPageBreak-Mode to ON.
AutoBreakOff, AO
Sets the AutoPageBreak-Mode to OFF.
AutoBreakNoLimits, ANL
Sets the AutoPageBreak-Mode to NO LIMITS.
AutoBreakFull, AF
Sets the AutoPageBreak-Mode to FULL.
Rotate, Rot <angle>
Sets rotation to the specified angle. (clockwise, currently only 90 degree steps allowed, angle in 1/10 degrees) Example: "Rotate 900" = Rotate by 90 degrees clockwise
Bold, B
Sets the font setting to bold.
BoldOff, BO
Sets the font setting to bold off.
Underline, U
Sets the font setting to underlined.
UnderlineOff, UO
Sets the font setting to underlined off.
Italic, I
Sets the font setting to italic.
ItalicOff, IO
Sets the font setting to italic off.
StrikeOut, ST
Sets the font setting to strikeout.
StrikeOutOff, STO
Sets the font setting to strikeout off.
Additionally the following flags are available in the Professional Edition and above:
Shadowed, SH
Sets shadow drawing on.
ShadowedOff, SHO
Sets shadow drawing off.
Viewable, VA
Sets the viewable mode to on.
ViewableOff, VAO
Sets the viewable mode to off.
Streamable, SA
Sets the streamable mode to on.
StreamableOff, SAO
Sets the streamable mode to off.
Printable, PA
Sets the printable mode to on.
PrintableOff, PAO
Sets the printable mode to off.