Path
Path contain geometry. Path may be empty, or contain one or more verbs that outline a figure. Path always starts with a move verb to a Cartesian coordinate, and may be followed by additional verbs that add lines or curves.
Adding a close verb makes the geometry into a continuous loop, a closed contour. Path may contain any number of contours, each beginning with a move verb.
Path contours may contain only a move verb, or may also contain lines, quadratic beziers, conics, and cubic beziers. Path contours may be open or closed.
When used to draw a filled area, Path describes whether the fill is inside or outside the geometry. Path also describes the winding rule used to fill overlapping contours.
Internally, Path lazily computes metrics likes bounds and convexity. Call updateBoundsCache to make Path thread safe.
Constructors
Constructs an empty Path. By default, Path has no verbs, no Point, and no weights. FillMode is set to PathFillMode.WINDING.
Properties
Returns the approximate byte size of the Path in memory.
Returns array of two points if Path contains only one line; Verb array has two entries: PathVerb.MOVE, PathVerb.LINE. Returns null if Path is not one line.
Returns the path's fill type. This defines how "inside" is computed. The default value is PathFillMode.WINDING.
Returns a non-zero, globally unique value. A different value is returned if verb array, Point array, or conic weight changes.
Returns if contour is closed.
Specifies whether Path is volatile; whether it will be altered or discarded by the caller after it is drawn. Path by default have volatile set false, allowing SkBaseDevice to attach a cache of data which speeds repeated drawing.
Returns the number of points in Path. Point count is initially zero.
Returns a mask, where each set bit corresponds to a SegmentMask constant if Path contains one or more verbs of that type.
Returns the number of verbs: PathVerb.MOVE, PathVerb.LINE, PathVerb.QUAD, PathVerb.CONIC, PathVerb.CUBIC, and PathVerb.CLOSE; added to Path.
Functions
Returns minimum and maximum axes values of the lines and curves in Path. Returns (0, 0, 0, 0) if Path contains no points. Returned bounds width and height may be larger or smaller than area affected when Path is drawn.
Returns true if rect is contained by Path. May return false when rect is contained by Path.
Returns true if the point is contained by Path, taking into account PathFillMode.
Returns true if the point (x, y) is contained by Path, taking into account PathFillMode.
Returns true if Path contain equal verbs and equal weights. If Path contain one or more conics, the weights must match.
Writes Path to byte buffer.
Specifies whether Path is volatile; whether it will be altered or discarded by the caller after it is drawn. Path by default have volatile set false, allowing SkBaseDevice to attach a cache of data which speeds repeated drawing.