Method: Gosu::Font#draw_text_rel

Defined in:
rdoc/gosu.rb

#draw_text_rel(text, x, y, z, rel_x, rel_y, scale_x = 1, scale_y = 1, color = 0xff_ffffff, mode = :default) ⇒ void

This method returns an undefined value.

Draws a single line of text relative to (x, y).

The text is aligned to the drawing location according to the ‘rel_x` and `rel_y` parameters: a value of 0.0 corresponds to top and left, while 1.0 corresponds to bottom and right. A value of 0.5 naturally corresponds to the center of the text.

All real numbers are valid alignment values and will be interpolated (or extrapolated) accordingly.

Parameters:

  • rel_x (Float)

    the horizontal alignment.

  • rel_y (Float)

    the vertical alignment.

See Also:



331
# File 'rdoc/gosu.rb', line 331

def draw_text_rel(text, x, y, z, rel_x, rel_y, scale_x=1, scale_y=1, color=0xff_ffffff, mode=:default); end