Graphics.TextUnit
From Xojo Documentation
| This item was deprecated in version 2019r2. Please use FontUnit as a replacement. |
Property (As FontUnits )
aGraphics.TextUnit = newFontUnitsValue
or
FontUnitsValue = aGraphics.TextUnit
New in 2009r4
Supported for all project types and targets.
or
FontUnitsValue = aGraphics.TextUnit
New in 2009r4
Supported for all project types and targets.
The units in which TextSize is measured.
Notes
| TextUnit and the FontUnits enumeration are not available for use in Console or Web apps. |
The FontUnits enumeration values are shown below:
| Value |
|---|
| Default |
| Pixel |
| Point |
| Inch |
| Millimeter |
Sample Code
This example sets the units to points using the class constant.
g.ForeColor = &cff0000
g.Italic = True
g.TextUnit = FontUnits.Point
g.TextSize = 16
g.DrawString("Hello world", 10, 10)
g.Italic = True
g.TextUnit = FontUnits.Point
g.TextSize = 16
g.DrawString("Hello world", 10, 10)
