GlyphItem class final

A glyph of a math font, drawn from its outline.

Inheritance

Constructors

GlyphItem(MathFont font, int glyph, double x, double y, double size, {bool mirrorable = false, bool flipped = false, LatexColor? color, ItemInfo info = ItemInfo.none})
Creates a glyph.
const

Properties

advance → double
The glyph's advance in em at size.
no setter
color → LatexColor?
Colour; null means the renderer's current colour.
finalinherited
flipped → bool
Draw mirrored left-to-right: the outline is reflected about the middle of the glyph's advance.
final
font → MathFont
The font.
final
glyph → int
Glyph id.
final
hashCode → int
The hash code for this object.
no setterinherited
info → ItemInfo
Source metadata.
finalinherited
mirrorable → bool
Whether the glyph has a direction (delimiters, radicals, ∑, arrows, <…) and is drawn mirrored in right-to-left math.
final
outline → GlyphPath
The outline in font units, y up. To paint: scale by size / font.unitsPerEm, flip y, and move to (x, y); when flipped, also reflect x within the advance (x' = advance - x).
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → double
Scale: 1 = base font size.
final
x → double
Left of the glyph origin.
final
y → double
Baseline.
final

Methods

decorate({LatexColor? color, String? addClass, String? link}) → GlyphItem
This item with color if it has none yet, and extra metadata.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
translate(double dx, double dy) → GlyphItem
This item moved by (dx, dy).
override
withFlip({required bool flipped, double? x}) → GlyphItem
A copy with different mirroring.

Operators

operator ==(Object other) → bool
The equality operator.
inherited