Class: FT2::BitmapGlyph
Class Method Summary collapse
-
.initialize ⇒ Object
Constructor for FT2::BitmapGlyph class.
Instance Method Summary collapse
-
#bitmap ⇒ Object
Get the FT2::Bitmap of a FT2::BitmapGlyph object.
-
#left ⇒ Object
Get the left-side bearing of a BitmapGlyph object.
-
#top ⇒ Object
Get the top-side bearing of a BitmapGlyph object.
Methods inherited from Glyph
#advance, #cbox, #class, #dup, #format, #library, #to_bmap, #transform
Class Method Details
.initialize ⇒ Object
Constructor for FT2::BitmapGlyph class.
This method is currently empty. You should never call this method directly unless you’re instantiating a derived class (ie, you know what you’re doing).
2659 2660 2661 |
# File 'ext/ft2-ruby/ft2.c', line 2659 static VALUE ft_bmapglyph_init(VALUE self) { return self; } |
Instance Method Details
#bitmap ⇒ Object
Get the FT2::Bitmap of a FT2::BitmapGlyph object.
Examples:
bmap = bmap_glyph.bitmap
2711 2712 2713 2714 2715 |
# File 'ext/ft2-ruby/ft2.c', line 2711
static VALUE ft_bmapglyph_bitmap(VALUE self) {
FT_BitmapGlyph *glyph;
Data_Get_Struct(self, FT_BitmapGlyph, glyph);
return Data_Wrap_Struct(cBitmapGlyph, 0, glyph_free, &(*glyph)->bitmap);
}
|
#left ⇒ Object
Get the left-side bearing of a BitmapGlyph object.
Description:
The left-side bearing, i.e., the horizontal distance from the
current pen position to the left border of the glyph bitmap.
Note:
FT2::BitmapGlyph is a subclass of FT2::Glyph.
Examples:
x = bmap_glyph.left
2698 2699 2700 2701 2702 |
# File 'ext/ft2-ruby/ft2.c', line 2698
static VALUE ft_bmapglyph_left(VALUE self) {
FT_BitmapGlyph *glyph;
Data_Get_Struct(self, FT_BitmapGlyph, glyph);
return INT2FIX((*glyph)->left);
}
|
#top ⇒ Object
Get the top-side bearing of a BitmapGlyph object.
Description:
The top-side bearing, i.e., the vertical distance from the current
pen position to the top border of the glyph bitmap. This distance
is positive for upwards-y.
Note:
FT2::BitmapGlyph is a subclass of FT2::Glyph.
Examples:
y = bmap_glyph.top
2678 2679 2680 2681 2682 |
# File 'ext/ft2-ruby/ft2.c', line 2678
static VALUE ft_bmapglyph_top(VALUE self) {
FT_BitmapGlyph *glyph;
Data_Get_Struct(self, FT_BitmapGlyph, glyph);
return INT2FIX((*glyph)->top);
}
|