Method: Processing::GraphicsContext#square

Defined in:
lib/processing/graphics_context.rb

#square(x, y, extent) ⇒ nil Also known as: drawSquare

Draws a square.

Parameters:

  • x (Numeric)

    horizontal position of the shape

  • y (Numeric)

    vertical position of the shape

  • extent (Numeric)

    width and height of the shape

Returns:

  • (nil)

    nil

See Also:



1662
1663
1664
# File 'lib/processing/graphics_context.rb', line 1662

def square(x, y, extent)
  rect x, y, extent, extent
end