Graphics.TextUnit

From Xojo Documentation

Property (As FontUnits )
aGraphics.TextUnit = newFontUnitsValue
or
FontUnitsValue = aGraphics.TextUnit

New in 2009r4

Supported for all project types and targets.

The units in which TextSize is measured.

Notes

fa-info-circle-32.png
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)

See Also

FontUnits Enumeration