Class: EhbGameLib::Text::BitmapFont
- Inherits:
-
Object
- Object
- EhbGameLib::Text::BitmapFont
- Defined in:
- lib/ehb_game_lib/text/bitmap_font.rb
Instance Attribute Summary collapse
-
#line_height ⇒ Object
readonly
Returns the value of attribute line_height.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #image(text) ⇒ Object
-
#initialize(name, line_height) ⇒ BitmapFont
constructor
A new instance of BitmapFont.
Constructor Details
#initialize(name, line_height) ⇒ BitmapFont
Returns a new instance of BitmapFont.
8 9 10 11 |
# File 'lib/ehb_game_lib/text/bitmap_font.rb', line 8 def initialize(name, line_height) @name = name @line_height = line_height end |
Instance Attribute Details
#line_height ⇒ Object (readonly)
Returns the value of attribute line_height.
6 7 8 |
# File 'lib/ehb_game_lib/text/bitmap_font.rb', line 6 def line_height @line_height end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/ehb_game_lib/text/bitmap_font.rb', line 6 def name @name end |
Instance Method Details
#image(text) ⇒ Object
13 14 15 |
# File 'lib/ehb_game_lib/text/bitmap_font.rb', line 13 def image(text) ::Gosu::Image.from_text(text, line_height, retro: true, font: name) end |