Class globals canvas api path Path
------------------------------------------------------------------------------- canvas.Path ------------------------------------------------------------------------------- Class for an (OpenVG) path element on a canvas
Functions
addSegment
Add a path segment
arcLargeCCWTo
Draw an elliptical arc (longer counter-clockwise arc)
arcLargeCWTo
Draw an elliptical arc (shorter clockwise arc)
arcSmallCCWTo
Draw an elliptical arc (shorter counter-clockwise arc)
arcSmallCWTo
Draw an elliptical arc (shorter clockwise arc)
circle
Add a circle to the path @param r radius @param cx (optional) center x coordinate or vector [cx, cy] @param cy (optional) center y coordinate
close
Close the path (implicit lineTo to first point of path)
cubicTo
Add a cubic Bézier curve
ellipse
Add an ellipse to the path @param rx radius x @param ry radius y @param cx (optional) center x coordinate or vector [cx, cy] @param cy (optional) center y coordinate
getNumCoords
Get the number of coordinates (each command has 0..n coords)
getNumSegments
Get the number of segments
horizTo
Add a horizontal line
lineTo
Add a line
moveTo
Move path cursor
pop_back
Remove last segment
pop_front
Remove first segment
quadTo
Add a quadratic Bézier curve
rect
Add a (rounded) rectangle to the path @param x Position of left border @param y Position of top border @param w Width @param h Height @param cfg Optional settings (eg. {"border-top-radius": 5})
reset
Remove all existing path data
scubicTo
Add a smooth cubic Bézier curve
setData
Set the path data (commands and coordinates)
setStrokeDashArray
Set stroke dasharray @param pattern Vector, Vector of alternating dash and gap lengths [on1, off1, on2, ...]
setStrokeLineCap
Set stroke linecap @param linecap String, "butt", "round" or "square" See http://www.w3.org/TR/SVG/painting.html#StrokeLinecapProperty for details
setStrokeLineJoin
Set stroke linejoin @param linejoin String, "miter", "round" or "bevel" See http://www.w3.org/TR/SVG/painting.html#StrokeLinejoinProperty for details
squadTo
Add a smooth quadratic Bézier curve
square
Add a (rounded) square to the path @param x Position of left border @param y Position of top border @param l length @param cfg Optional settings (eg. {"border-top-radius": 5})
vertTo
Add a vertical line
Variables
VG_CLOSE_PATH
Path segment commands (VGPathCommand)
num_coords
Number of coordinates per command