Method: Gosu::Font#draw
- Defined in:
- lib/gosu_android/graphics/font.rb
#draw(text, x, y, z, factor_x = 1, factor_y = 1, c = Color::WHITE, mode = :default) ⇒ Object
Draws text so the top left corner of the text is at (x; y). param text Formatted text without line-breaks.
44 45 46 47 48 49 50 51 52 53 |
# File 'lib/gosu_android/graphics/font.rb', line 44 def draw(text, x, y, z, factor_x = 1, factor_y = 1, c = Color::WHITE, mode = :default) offset = 0 text.each_char do |char| (@fonts_manager.getSymbol char ).draw(x + offset, y, z, factor_x, factor_y, c, mode) offset += 10 end end |