Class: Image
- Inherits:
-
Object
- Object
- Image
- Defined in:
- bdffont.rb
Overview
Imageクラスに追加するBDFフォント描画用メソッド
Instance Method Summary (collapse)
-
- (Object) draw_bdffont(x, y, str, bdf)
BDFフォントを描画.
Instance Method Details
- (Object) draw_bdffont(x, y, str, bdf)
BDFフォントを描画
321 322 323 324 325 326 327 328 329 330 331 |
# File 'bdffont.rb', line 321 def draw_bdffont(x, y, str, bdf) str.split('').each do |code| b = bdf[code] unless b == nil x1 = x + b.ofsx y1 = y + bdf.height + bdf.ofsy - b.h - b.ofsy self.draw(x1, y1, b.image) x += b.dwidth end end end |