Method: Processing::GraphicsContext#curve

Defined in:
lib/processing/graphics_context.rb

#curve(cx1, cy1, x1, y1, x2, y2, cx2, cy2) ⇒ nil Also known as: drawCurve

Draws a Catmull-Rom spline curve.

Parameters:

  • cx1 (Numeric)

    horizontal position of beginning control point

  • cy1 (Numeric)

    vertical position of beginning control point

  • x1 (Numeric)

    horizontal position of first point

  • y1 (Numeric)

    vertical position of first point

  • x2 (Numeric)

    horizontal position of second point

  • y2 (Numeric)

    vertical position of second point

  • cx2 (Numeric)

    horizontal position of ending control point

  • cy2 (Numeric)

    vertical position of ending control point

Returns:

  • (nil)

    nil



903
904
905
906
907
# File 'lib/processing/graphics_context.rb', line 903

def curve(cx1, cy1, x1, y1, x2, y2, cx2, cy2)
  assertDrawing__
  @painter__.curve cx1, cy1, x1, y1, x2, y2, cx2, cy2
  nil
end