|
| SkPathBuilder () |
|
| SkPathBuilder (SkPathFillType) |
|
| SkPathBuilder (const SkPath &) |
|
| SkPathBuilder (const SkPathBuilder &)=default |
|
| ~SkPathBuilder () |
|
SkPathBuilder & | operator= (const SkPath &) |
|
SkPathBuilder & | operator= (const SkPathBuilder &)=default |
|
SkPathFillType | fillType () const |
|
SkRect | computeBounds () const |
|
SkPath | snapshot () const |
|
SkPath | detach () |
|
SkPathBuilder & | setFillType (SkPathFillType ft) |
|
SkPathBuilder & | setIsVolatile (bool isVolatile) |
|
SkPathBuilder & | reset () |
|
SkPathBuilder & | moveTo (SkPoint pt) |
|
SkPathBuilder & | moveTo (SkScalar x, SkScalar y) |
|
SkPathBuilder & | lineTo (SkPoint pt) |
|
SkPathBuilder & | lineTo (SkScalar x, SkScalar y) |
|
SkPathBuilder & | quadTo (SkPoint pt1, SkPoint pt2) |
|
SkPathBuilder & | quadTo (SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) |
|
SkPathBuilder & | quadTo (const SkPoint pts[2]) |
|
SkPathBuilder & | conicTo (SkPoint pt1, SkPoint pt2, SkScalar w) |
|
SkPathBuilder & | conicTo (SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar w) |
|
SkPathBuilder & | conicTo (const SkPoint pts[2], SkScalar w) |
|
SkPathBuilder & | cubicTo (SkPoint pt1, SkPoint pt2, SkPoint pt3) |
|
SkPathBuilder & | cubicTo (SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar x3, SkScalar y3) |
|
SkPathBuilder & | cubicTo (const SkPoint pts[3]) |
|
SkPathBuilder & | close () |
|
SkPathBuilder & | polylineTo (const SkPoint pts[], int count) |
|
SkPathBuilder & | polylineTo (const std::initializer_list< SkPoint > &list) |
|
SkPathBuilder & | rLineTo (SkPoint pt) |
|
SkPathBuilder & | rLineTo (SkScalar x, SkScalar y) |
|
SkPathBuilder & | rQuadTo (SkPoint pt1, SkPoint pt2) |
|
SkPathBuilder & | rQuadTo (SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) |
|
SkPathBuilder & | rConicTo (SkPoint p1, SkPoint p2, SkScalar w) |
|
SkPathBuilder & | rConicTo (SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar w) |
|
SkPathBuilder & | rCubicTo (SkPoint pt1, SkPoint pt2, SkPoint pt3) |
|
SkPathBuilder & | rCubicTo (SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar x3, SkScalar y3) |
|
SkPathBuilder & | arcTo (const SkRect &oval, SkScalar startAngleDeg, SkScalar sweepAngleDeg, bool forceMoveTo) |
| Appends arc to the builder. More...
|
|
SkPathBuilder & | arcTo (SkPoint p1, SkPoint p2, SkScalar radius) |
| Appends arc to SkPath, after appending line if needed. More...
|
|
SkPathBuilder & | arcTo (SkPoint r, SkScalar xAxisRotate, ArcSize largeArc, SkPathDirection sweep, SkPoint xy) |
| Appends arc to SkPath. More...
|
|
SkPathBuilder & | addArc (const SkRect &oval, SkScalar startAngleDeg, SkScalar sweepAngleDeg) |
| Appends arc to the builder, as the start of new contour. More...
|
|
SkPathBuilder & | addRect (const SkRect &, SkPathDirection, unsigned startIndex) |
|
SkPathBuilder & | addOval (const SkRect &, SkPathDirection, unsigned startIndex) |
|
SkPathBuilder & | addRRect (const SkRRect &, SkPathDirection, unsigned startIndex) |
|
SkPathBuilder & | addRect (const SkRect &rect, SkPathDirection dir=SkPathDirection::kCW) |
|
SkPathBuilder & | addOval (const SkRect &rect, SkPathDirection dir=SkPathDirection::kCW) |
|
SkPathBuilder & | addRRect (const SkRRect &rrect, SkPathDirection dir=SkPathDirection::kCW) |
|
SkPathBuilder & | addCircle (SkScalar center_x, SkScalar center_y, SkScalar radius, SkPathDirection dir=SkPathDirection::kCW) |
|
SkPathBuilder & | addPolygon (const SkPoint pts[], int count, bool isClosed) |
|
SkPathBuilder & | addPolygon (const std::initializer_list< SkPoint > &list, bool isClosed) |
|
SkPathBuilder & | addPath (const SkPath &) |
|
void | incReserve (int extraPtCount, int extraVerbCount) |
|
void | incReserve (int extraPtCount) |
|
SkPathBuilder & | offset (SkScalar dx, SkScalar dy) |
|
SkPathBuilder & | toggleInverseFillType () |
|
Appends arc to the builder, as the start of new contour.
Arc added is part of ellipse bounded by oval, from startAngle through sweepAngle. Both startAngle and sweepAngle are measured in degrees, where zero degrees is aligned with the positive x-axis, and positive sweeps extends arc clockwise.
If sweepAngle <= -360, or sweepAngle >= 360; and startAngle modulo 90 is nearly zero, append oval instead of arc. Otherwise, sweepAngle values are treated modulo 360, and arc may or may not draw depending on numeric rounding.
- Parameters
-
oval | bounds of ellipse containing arc |
startAngleDeg | starting angle of arc in degrees |
sweepAngleDeg | sweep, in degrees. Positive is clockwise; treated modulo 360 |
- Returns
- reference to this builder
Appends arc to the builder.
Arc added is part of ellipse bounded by oval, from startAngle through sweepAngle. Both startAngle and sweepAngle are measured in degrees, where zero degrees is aligned with the positive x-axis, and positive sweeps extends arc clockwise.
arcTo() adds line connecting the builder's last point to initial arc point if forceMoveTo is false and the builder is not empty. Otherwise, added contour begins with first point of arc. Angles greater than -360 and less than 360 are treated modulo 360.
- Parameters
-
oval | bounds of ellipse containing arc |
startAngleDeg | starting angle of arc in degrees |
sweepAngleDeg | sweep, in degrees. Positive is clockwise; treated modulo 360 |
forceMoveTo | true to start a new contour with arc |
- Returns
- reference to the builder
Appends arc to SkPath, after appending line if needed.
Arc is implemented by conic weighted to describe part of circle. Arc is contained by tangent from last SkPath point to p1, and tangent from p1 to p2. Arc is part of circle sized to radius, positioned so it touches both tangent lines.
If last SkPath SkPoint does not start arc, arcTo() appends connecting line to SkPath. The length of vector from p1 to p2 does not affect arc.
Arc sweep is always less than 180 degrees. If radius is zero, or if tangents are nearly parallel, arcTo() appends line from last SkPath SkPoint to p1.
arcTo() appends at most one line and one conic. arcTo() implements the functionality of PostScript arct and HTML Canvas arcTo.
- Parameters
-
p1 | SkPoint common to pair of tangents |
p2 | end of second tangent |
radius | distance from arc to circle center |
- Returns
- reference to SkPath
Appends arc to SkPath.
Arc is implemented by one or more conic weighted to describe part of oval with radii (r.fX, r.fY) rotated by xAxisRotate degrees. Arc curves from last SkPath SkPoint to (xy.fX, xy.fY), choosing one of four possible routes: clockwise or counterclockwise, and smaller or larger.
Arc sweep is always less than 360 degrees. arcTo() appends line to xy if either radii are zero, or if last SkPath SkPoint equals (xy.fX, xy.fY). arcTo() scales radii r to fit last SkPath SkPoint and xy if both are greater than zero but too small to describe an arc.
arcTo() appends up to four conic curves. arcTo() implements the functionality of SVG arc, although SVG sweep-flag value is opposite the integer value of sweep; SVG sweep-flag uses 1 for clockwise, while kCW_Direction cast to int is zero.
- Parameters
-
r | radii on axes before x-axis rotation |
xAxisRotate | x-axis rotation in degrees; positive values are clockwise |
largeArc | chooses smaller or larger arc |
sweep | chooses clockwise or counterclockwise arc |
xy | end of arc |
- Returns
- reference to SkPath