instance. Text

Members and methods attached to the rac.Text function.

The function contains ready-made convenience Text objects for usual values, all setup with the owning Rac instance.

Example
let rac = new Rac()
rac.Text.hello // ready-made hello-world text
rac.Text.hello.rac === rac // true

Namespaces

Format

Members

hello :Rac.Text

A Text for drawing hello world with topLeft format at Point.zero.

sphinx :Rac.Text

A Text for drawing the pangram sphinx of black quartz, judge my vow with topLeft format at Point.zero.

Methods

Format(hAlign, vAlign, angleopt, fontopt, sizeopt, hPaddingopt, vPaddingopt)

Convenience function to create a new Text.Format. Alias of rac.TextFormat.

Parameters:
Name Type Attributes Default Description
hAlign String

The horizontal alignment, left-to-right; one of the values from horizontalAlign

vAlign String

The vertical alignment, top-to-bottom; one of the values from verticalAlign

angle Rac.Angle <optional>
rac.Angle.zero

The angle towards which the text is drawn

font String <optional>
null

The font name

size Number <optional>
null

The font size

hPadding Number <optional>
0

The horizontal padding, left-to-right

vPadding Number <optional>
0

The vertical padding, top-to-bottom