Class: SFML::Glyph
- Inherits:
-
Object
- Object
- SFML::Glyph
- Defined in:
- ext/graphics/glyph.c,
ext/graphics/glyph.c
Overview
A single character's rendering metrics and texture location, as returned by Font#glyph. Read-only.
Instance Method Summary collapse
-
#advance ⇒ Float
Returns the glyph's horizontal advance.
-
#bounds ⇒ Rect
Returns the glyph's bounding box.
-
#texture_rect ⇒ Rect
Returns the sub-rectangle of the texture displayed on the object.
Instance Method Details
#advance ⇒ Float
Returns the glyph's horizontal advance.
43 44 45 |
# File 'ext/graphics/glyph.c', line 43
static VALUE Glyph_get_advance(VALUE self) {
return DBL2NUM(Get_Glyph(self)->glyph.advance);
}
|
#bounds ⇒ Rect
Returns the glyph's bounding box.
54 55 56 |
# File 'ext/graphics/glyph.c', line 54
static VALUE Glyph_get_bounds(VALUE self) {
return rect_to_rb(Get_Glyph(self)->glyph.bounds);
}
|
#texture_rect ⇒ Rect
Returns the sub-rectangle of the texture displayed on the object.
65 66 67 |
# File 'ext/graphics/glyph.c', line 65
static VALUE Glyph_get_texture_rect(VALUE self) {
return int_rect_to_rb(Get_Glyph(self)->glyph.textureRect);
}
|