Method: GR.drawpath

Defined in:
lib/gr.rb

.drawpath(points, codes, fill) ⇒ Object

Draw simple and compound outlines consisting of line segments and bezier curves.

Parameters:

  • points (Array, NArray)

    (N, 2) array of (x, y) vertices

  • codes (Array, NArray)

    N-length array of path codes

    • STOP : end the entire path

    • MOVETO : move to the given vertex

    • LINETO : draw a line from the current position to the given vertex

    • CURVE3 : draw a quadratic Bézier curve

    • CURVE4 : draw a cubic Bézier curve

    • CLOSEPOLY : draw a line segment to the start point of the current path

  • fill (Integer)

    A flag indication whether resulting path is to be filled or not



1731
1732
1733
1734
# File 'lib/gr.rb', line 1731

def drawpath(points, codes, fill)
  len = codes.length
  super(len, points, uint8(codes), fill)
end