struct SF::Glyph
- SF::Glyph
- Struct
- Value
- Object
Overview
Structure describing a glyph
A glyph is the visual representation of a character.
The SF::Glyph
structure provides the information needed
to handle the glyph:
- its coordinates in the font's texture
- its bounding rectangle
- the offset to apply to get the starting position of the next glyph
See also: SF::Font
Defined in:
graphics/obj.crConstructors
-
.new
Default constructor
Instance Method Summary
-
#advance : Float32
Offset to move horizontally to the next character
- #advance=(advance : Number)
-
#bounds : FloatRect
Bounding rectangle of the glyph, in coordinates relative to the baseline
- #bounds=(bounds : FloatRect)
-
#dup : Glyph
Returns a shallow copy of this object.
-
#texture_rect : IntRect
Texture coordinates of the glyph inside the font's texture
- #texture_rect=(texture_rect : IntRect)
Constructor Detail
Instance Method Detail
Bounding rectangle of the glyph, in coordinates relative to the baseline
Description copied from struct Value
Returns a shallow copy of this object.
Because Value
is a value type, this method returns self
,
which already involves a shallow copy of this object because
value types are passed by value.
Texture coordinates of the glyph inside the font's texture