Class: Image
- Inherits:
-
Object
- Object
- Image
- Defined in:
- bmfont.rb
Overview
Imageクラスに追加するBMFont描画用メソッド
Instance Method Summary (collapse)
-
- (Object) draw_bmfont(x, y, str, bmfont)
BMFontを描画.
Instance Method Details
- (Object) draw_bmfont(x, y, str, bmfont)
BMFontを描画
127 128 129 130 131 132 133 134 |
# File 'bmfont.rb', line 127 def draw_bmfont(x, y, str, bmfont) str.each_byte do |code| x1 = x + bmfont[code].xofs y1 = y + bmfont[code].yofs - bmfont.line_height + bmfont.baseofs self.draw(x1, y1, bmfont[code].image) x += bmfont[code].xadvance + bmfont.spacing end end |