Method: MiniGL::TextHelper#initialize

Defined in:
lib/minigl/text.rb

#initialize(font, line_spacing = 0, scale_x = 1, scale_y = 1) ⇒ TextHelper

Creates a TextHelper.

Parameters:

font

A Gosu::Font or ImageFont that will be used to draw the text.

line_spacing

When drawing multiple lines, the default distance, in pixels, between each line.

scale_x

The default horizontal scale of the font.

scale_y

The default vertical scale of the font.



135
136
137
138
139
140
# File 'lib/minigl/text.rb', line 135

def initialize(font, line_spacing = 0, scale_x = 1, scale_y = 1)
  @font = font
  @line_spacing = line_spacing
  @scale_x = scale_x
  @scale_y = scale_y
end