Developer   API   Graphics   Path

  •  Config(0)
  •  Properties(2)
  •  Methods(13)
  •  Events(0)

Path(native)

The Path class encapsulates compound (multiple contour) geometric paths consisting of straight line segments, quadratic curves, and cubic curves.

Properties

  • bounds : T:Multiple
    The bounds of the path's points. If the path contains 0 or 1 points, the bounds is set to (0,0,0,0), and isEmpty() will return true.
  • fillType : Symbol

Methods

  • arcTo(left, top, right, bottom, startAngle, sweepAngle, forceMoveTo) : Path
    Append the specified arc to the path as a new contour. If the start of the path is different from the path's current last point, then an automatic lineTo() is added to connect the current contour to the start of the arc. However, if the path is empty, then we call moveTo() with the first point of the arc. The sweep angle is treated mod 360.
  • arcTo(x1, y1, x2, y2, radius) : Path
    Append a line and arc to the current path. This is the same as the PostScript call "arct".
  • close()
    Close the current contour. If the current point is not equal to the first point of the contour, a line segment is automatically added.
  • cubicTo(x1, y1, x2, y2, x3, y3)
    Add a cubic bezier from the last point, approaching control points (x1,y1) and (x2,y2), and ending at (x3,y3). If no moveTo() call has been made for this contour, the first point is automatically set to (0,0).
  • this(svg) : Path
    Loads vector graphics from SVG string.
  • getBounds() : Multivalue
    Returns the bounds of the path's points. If the path contains 0 or 1 points, the bounds is set to (0,0,0,0), and isEmpty() will return true. Note: this bounds may be larger than the actual shape, since curves do not extend as far as their control points.
  • lineTo(x, y) : Path
    Add a line from the last point to the specified point (x,y). If no moveTo() call has been made for this contour, the first point is automatically set to (0,0).
  • moveTo(x,y) : Path
    Set the beginning of the next contour to the point (x,y).
  • offset(dx, dy) : Path
    Offset the path by (dx, dy).
  • quadTo(x1, y1, x2, y2) : Path
    Add a quadratic bezier from the last point, approaching control point (x1,y1), and ending at (x2,y2). If no moveTo() call has been made for this contour, the first point is automatically set to (0,0).
  • reset()
    Clear any lines and curves from the path, making it empty. This frees up internal storage associated with those segments. This does NOT change the fill-type setting nor Convex.
  • this() : Path
    Object constructor creates new Path object.
  • transform(matrix) : Path
    Transform the points in this path by matrix

Remarks

This class manages operations with vector graphics.

API Navigation
Skip Navigation Links.
Expand <span>User Interface</span> User Interface
Expand <span>Core & System</span> Core & System
Collapse <span>Graphics</span> Graphics
Canvas
Paint
Bitmap
Typeface
Path
Matrix
Shader
ColorFilter
MaskFilter
Expand <span>Files and Databases</span> Files and Databases
Expand <span>Crypto</span> Crypto
Expand <span>Native User Interface</span> Native User Interface
Expand <span>Net</span> Net
Expand <span>Media</span> Media
Expand <span>Sensor</span> Sensor
Expand <span>Game Development</span> Game Development