Method: Gosu.draw_rect

Defined in:
rdoc/gosu.rb

.draw_rect(x, y, width, height, c, z = 0, mode = :default) ⇒ void

This method returns an undefined value.

Draws a rectangle (actually a quad, or two triangles).

Parameters:

  • x (Float)

    the X coordinate of the rectangle’s top left corner.

  • y (Float)

    the Y coordinate of the rectangle’s top left corner.

  • width (Float)

    the width of the rectangle.

  • height (Float)

    the height of the rectangle.

  • c (Gosu::Color)

    the color of the rectangle.

  • z (Float) (defaults to: 0)

    the Z-order.

  • mode (:default, :additive) (defaults to: :default)

    the blending mode to use.

See Also:



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

def draw_rect(x, y, width, height, c, z=0, mode=:default); end