 |
Skia
2D Graphics Library
|
Go to the documentation of this file.
13 #include "include/private/SkPathRef.h"
14 #include "include/private/SkTo.h"
16 #include <initializer_list>
18 class SkAutoPathBoundsUpdate;
66 const uint8_t[],
int verbCount,
67 const SkScalar[],
int conicWeightCount,
71 unsigned startIndex = 0);
83 bool isVolatile =
false);
85 static SkPath Polygon(
const std::initializer_list<SkPoint>& list,
bool isClosed,
87 bool isVolatile =
false) {
88 return Polygon(list.begin(), SkToInt(list.size()), isClosed, fillType, isVolatile);
92 return Polygon({a, b},
false);
209 fFillType = SkToU8(ft);
229 return SkPathConvexity::kConvex == this->getConvexity();
290 return 0 == fPathRef->countVerbs();
311 return fPathRef->isFinite();
342 fIsVolatile = isVolatile;
374 const SkPoint& p3,
bool exact);
486 return fPathRef->getBounds();
546 #ifdef SK_HIDE_PATH_EDIT_METHODS
566 return this->moveTo(p.
fX, p.
fY);
606 return this->lineTo(p.
fX, p.
fY);
658 return this->quadTo(p1.
fX, p1.
fY, p2.
fX, p2.
fY);
731 return this->conicTo(p1.
fX, p1.
fY, p2.
fX, p2.
fY, w);
795 return this->cubicTo(p1.
fX, p1.
fY, p2.
fX, p2.
fY, p3.
fX, p3.
fY);
887 return this->arcTo(p1.
fX, p1.
fY, p2.
fX, p2.
fY, radius);
951 return this->arcTo(r.
fX, r.
fY, xAxisRotate, largeArc, sweep, xy.
fX, xy.
fY);
997 #ifdef SK_HIDE_PATH_EDIT_METHODS
1046 #ifdef SK_HIDE_PATH_EDIT_METHODS
1078 return this->addRect(rect, dir, 0);
1083 return this->addRect({left, top, right, bottom}, dir, 0);
1235 return this->addPoly(list.begin(), SkToInt(list.size()), close);
1238 #ifdef SK_HIDE_PATH_EDIT_METHODS
1279 return this->addPath(src, m, mode);
1324 this->offset(dx, dy,
this);
1350 this->transform(matrix,
this, pc);
1356 this->transform(m, &dst, pc);
1390 this->setLastPt(p.
fX, p.
fY);
1425 kDone_Verb = kClose_Verb + 1
1513 const uint8_t* fVerbs;
1514 const uint8_t* fVerbStop;
1534 RangeIter() =
default;
1535 RangeIter(
const uint8_t* verbs,
const SkPoint* points,
const SkScalar* weights)
1536 : fVerb(verbs), fPoints(points), fWeights(weights) {
1539 bool operator!=(
const RangeIter& that)
const {
1540 return fVerb != that.fVerb;
1542 bool operator==(
const RangeIter& that)
const {
1543 return fVerb == that.fVerb;
1545 RangeIter& operator++() {
1546 auto verb =
static_cast<SkPathVerb>(*fVerb++);
1547 fPoints += pts_advance_after_verb(verb);
1553 RangeIter operator++(
int) {
1554 RangeIter copy = *
this;
1561 std::tuple<SkPathVerb, const SkPoint*, const SkScalar*> operator*()
const {
1566 int backset = pts_backset_for_verb(verb);
1567 SkASSERT(fPoints + backset >= fInitialPoints);
1568 return {verb, fPoints + backset, fWeights};
1571 constexpr
static int pts_advance_after_verb(
SkPathVerb verb) {
1582 constexpr
static int pts_backset_for_verb(
SkPathVerb verb) {
1593 const uint8_t* fVerb =
nullptr;
1594 const SkPoint* fPoints =
nullptr;
1595 const SkScalar* fWeights =
nullptr;
1643 return (fIter != fEnd) ?
static_cast<Verb>(std::get<0>(*fIter)) : kDone_Verb;
1654 return fConicWeight;
1762 bool isValid()
const {
return this->isValidImpl() && fPathRef->isValid(); }
1766 SkPathFirstDirection firstDirection);
1769 int fLastMoveToIndex;
1770 mutable std::atomic<uint8_t> fConvexity;
1771 mutable std::atomic<uint8_t> fFirstDirection;
1772 uint8_t fFillType : 2;
1773 uint8_t fIsVolatile : 1;
1785 void copyFields(
const SkPath& that);
1787 size_t writeToMemoryAsRRect(
void* buffer)
const;
1788 size_t readAsRRect(
const void*,
size_t);
1789 size_t readFromMemory_EQ4Or5(
const void*,
size_t);
1792 friend class SkPathPriv;
1793 friend class SkPathStroker;
1807 inline void injectMoveToIfNeeded();
1809 inline bool hasOnlyMoveTos()
const;
1811 SkPathConvexity computeConvexity()
const;
1817 bool isValidImpl()
const;
1818 SkDEBUGCODE(
void validateRef()
const { fPathRef->validate(); } )
1821 bool isZeroLengthSincePoint(
int startPtIndex)
const;
1826 bool hasComputedBounds()
const {
1828 return fPathRef->hasComputedBounds();
1833 void setBounds(
const SkRect& rect) {
1834 SkPathRef::Editor ed(&fPathRef);
1841 SkPath& dirtyAfterEdit();
1845 void setConvexity(SkPathConvexity)
const;
1847 void setFirstDirection(SkPathFirstDirection)
const;
1848 SkPathFirstDirection getFirstDirection()
const;
1853 SkPathConvexity getConvexity()
const;
1855 SkPathConvexity getConvexityOrUnknown()
const {
1856 return (SkPathConvexity)fConvexity.load(std::memory_order_relaxed);
1860 bool isConvexityAccurate()
const;
1868 void setConvexity(SkPathConvexity convexity);
1878 friend class SkAutoPathBoundsUpdate;
1879 friend class SkAutoDisableOvalCheck;
1880 friend class SkAutoDisableDirectionCheck;
1882 friend class SkPathEdgeIter;
1883 friend class SkPathWriter;
1885 friend class SkBench_AddPathTest;
1886 friend class PathTest_Private;
1887 friend class ForceIsRRect_Private;
1888 friend class FuzzPath;
SkRect computeTightBounds() const
Returns minimum and maximum axes values of the lines and curves in SkPath.
SkPath & close()
Appends kClose_Verb to SkPath.
SkPath & arcTo(const SkPoint p1, const SkPoint p2, SkScalar radius)
Appends arc to SkPath, after appending line if needed.
Definition: SkPath.h:886
void setPath(const SkPath &)
Sets SkPath::Iter to return elements of verb array, SkPoint array, and conic weight in path.
static bool SkPathFillType_IsInverse(SkPathFillType ft)
Definition: SkPathTypes.h:28
SkPath & quadTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2)
Adds quad from last point towards (x1, y1), to (x2, y2).
SkScalar conicWeight() const
Returns conic weight if next() returned kConic_Verb.
Definition: SkPath.h:1488
@ kAppend_AddPathMode
appended to destination unaltered
Definition: SkPath.h:1247
bool operator==(const sk_sp< T > &a, const sk_sp< U > &b)
Definition: SkRefCnt.h:338
static SkPath Line(const SkPoint a, const SkPoint b)
Definition: SkPath.h:91
SkPath & addOval(const SkRect &oval, SkPathDirection dir, unsigned start)
Adds oval to SkPath, appending kMove_Verb, four kConic_Verb, and kClose_Verb.
static bool IsQuadDegenerate(const SkPoint &p1, const SkPoint &p2, const SkPoint &p3, bool exact)
Tests if quad is degenerate.
SkMatrix & reset()
Sets SkMatrix to identity; which has no effect on mapped SkPoint.
@ kConic_SkPathSegmentMask
Definition: SkPathTypes.h:46
const SkRect & getBounds() const
Returns minimum and maximum axes values of SkPoint array.
Definition: SkPath.h:485
@ kClose
SkPath::RawIter returns 0 points.
SkPath & addArc(const SkRect &oval, SkScalar startAngle, SkScalar sweepAngle)
Appends arc to SkPath, as the start of new contour.
SkPath & rewind()
Sets SkPath to its initial state, preserving internal storage.
@ kExtend_AddPathMode
add line if prior contour is not closed
Definition: SkPath.h:1248
size_t readFromMemory(const void *buffer, size_t length)
Initializes SkPath from buffer of size length.
static SkPath Polygon(const SkPoint pts[], int count, bool isClosed, SkPathFillType=SkPathFillType::kWinding, bool isVolatile=false)
@ kMove
SkPath::RawIter returns 1 point.
@ kQuad
SkPath::RawIter returns 3 points.
@ kWinding
Specifies that "inside" is computed by a non-zero sum of signed edge crossings.
static SkPath Circle(SkScalar center_x, SkScalar center_y, SkScalar radius, SkPathDirection dir=SkPathDirection::kCW)
SkPath & cubicTo(const SkPoint &p1, const SkPoint &p2, const SkPoint &p3)
Adds cubic from last point towards SkPoint p1, then towards SkPoint p2, ending at SkPoint p3.
Definition: SkPath.h:794
static SkPath RRect(const SkRRect &, SkPathDirection dir=SkPathDirection::kCW)
SkPath & conicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar w)
Adds conic from last point towards (x1, y1), to (x2, y2), weighted by w.
SkPath makeScale(SkScalar sx, SkScalar sy)
Definition: SkPath.h:1360
Verb
Definition: SkPath.h:1418
SkPathDirection
Definition: SkPathTypes.h:36
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
Iter(const SkPath &path, bool forceClose)
Sets SkPath::Iter to return elements of verb array, SkPoint array, and conic weight in path.
SkPath & rCubicTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2, SkScalar dx3, SkScalar dy3)
Adds cubic from last point towards vector (dx1, dy1), then towards vector (dx2, dy2),...
Verb next(SkPoint pts[4])
Returns next SkPath::Verb in verb array, and advances SkPath::Iter.
@ kLine
SkPath::RawIter returns 2 points.
SkPath & arcTo(const SkPoint r, SkScalar xAxisRotate, ArcSize largeArc, SkPathDirection sweep, const SkPoint xy)
Appends arc to SkPath.
Definition: SkPath.h:949
SkPath & addPoly(const std::initializer_list< SkPoint > &list, bool close)
Adds contour created from list.
Definition: SkPath.h:1234
Iter()
Initializes SkPath::Iter with an empty SkPath.
SkPath & conicTo(const SkPoint &p1, const SkPoint &p2, SkScalar w)
Adds conic from last point towards SkPoint p1, to SkPoint p2, weighted by w.
Definition: SkPath.h:730
SkPath & addRRect(const SkRRect &rrect, SkPathDirection dir=SkPathDirection::kCW)
Adds rrect to SkPath, creating a new closed contour.
SkPath & cubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar x3, SkScalar y3)
Adds cubic from last point towards (x1, y1), then towards (x2, y2), ending at (x3,...
SegmentMask
Definition: SkPath.h:1397
SkPath & lineTo(const SkPoint &p)
Adds line from last point to SkPoint p.
Definition: SkPath.h:605
SkPath & addRect(const SkRect &rect, SkPathDirection dir, unsigned start)
Adds a new contour to the path, defined by the rect, and wound in the specified direction.
SkPath & addRect(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom, SkPathDirection dir=SkPathDirection::kCW)
Definition: SkPath.h:1081
SkPath & addPath(const SkPath &src, SkScalar dx, SkScalar dy, AddPathMode mode=kAppend_AddPathMode)
Appends src to SkPath, offset by (dx, dy).
SkPath & rConicTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2, SkScalar w)
Adds conic from last point towards vector (dx1, dy1), to vector (dx2, dy2), weighted by w.
@ kLine_SkPathSegmentMask
Definition: SkPathTypes.h:44
SkData holds an immutable data buffer.
Definition: SkData.h:22
bool isLine(SkPoint line[2]) const
Returns true if SkPath contains only one line; SkPath::Verb array has two entries: kMove_Verb,...
SkPathVerb
Definition: SkPathTypes.h:50
SkPathFillType
Definition: SkPathTypes.h:13
void setPath(const SkPath &path, bool forceClose)
Sets SkPath::Iter to return elements of verb array, SkPoint array, and conic weight in path.
SkPathFillType getFillType() const
Returns SkPathFillType, the rule used to fill SkPath.
Definition: SkPath.h:203
void offset(SkScalar dx, SkScalar dy)
Offsets SkPoint array by (dx, dy).
Definition: SkPath.h:1323
bool operator!=(const sk_sp< T > &a, const sk_sp< U > &b)
Definition: SkRefCnt.h:348
bool isConvex() const
Returns true if the path is convex.
Definition: SkPath.h:228
void dumpArrays() const
Definition: SkPath.h:1692
AddPathMode
Definition: SkPath.h:1246
void transform(const SkMatrix &matrix, SkPath *dst, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
Transforms verb array, SkPoint array, and weight by matrix.
@ kQuad_SkPathSegmentMask
Definition: SkPathTypes.h:45
uint32_t getGenerationID() const
(See Skia bug 1762.) Returns a non-zero, globally unique value.
~SkPath()
Releases ownership of any shared data and deletes data if SkPath is sole owner.
void dump(SkWStream *stream, bool dumpAsHex) const
Writes text representation of SkPath to stream.
RawIter()
Initializes RawIter with an empty SkPath.
Definition: SkPath.h:1611
void dumpArrays(SkWStream *stream, bool dumpAsHex) const
SkPath & arcTo(const SkRect &oval, SkScalar startAngle, SkScalar sweepAngle, bool forceMoveTo)
Appends arc to SkPath.
bool isEmpty() const
Returns if SkPath is empty.
Definition: SkPath.h:288
bool conservativelyContainsRect(const SkRect &rect) const
Returns true if rect is contained by SkPath.
Definition: SkPoint.h:160
int getPoints(SkPoint points[], int max) const
Returns number of points in SkPath.
void setLastPt(const SkPoint &p)
Sets the last point on the path.
Definition: SkPath.h:1389
static constexpr bool SkToBool(const T &x)
Definition: SkTypes.h:497
void incReserve(int extraPtCount)
Grows SkPath verb array and SkPoint array to contain extraPtCount additional SkPoint.
bool getLastPt(SkPoint *lastPt) const
Returns last point on SkPath in lastPt.
static SkPath Oval(const SkRect &, SkPathDirection=SkPathDirection::kCW)
#define SkDEBUGCODE(...)
Definition: SkTypes.h:467
@ kSmall_ArcSize
smaller of arc pair
Definition: SkPath.h:895
SkPath & addCircle(SkScalar x, SkScalar y, SkScalar radius, SkPathDirection dir=SkPathDirection::kCW)
Adds circle centered at (x, y) of size radius to SkPath, appending kMove_Verb, four kConic_Verb,...
sk_sp< SkData > serialize() const
Writes SkPath to buffer, returning the buffer written to, wrapped in SkData.
#define SK_API
Definition: SkTypes.h:181
#define SkASSERT(cond)
Definition: SkTypes.h:460
static SkPath Make(const SkPoint[], int pointCount, const uint8_t[], int verbCount, const SkScalar[], int conicWeightCount, SkPathFillType, bool isVolatile=false)
Create a new path with the specified segments.
void setLastPt(SkScalar x, SkScalar y)
Sets last point to (x, y).
SkPath & addPoly(const SkPoint pts[], int count, bool close)
Adds contour created from line array, adding (count - 1) line segments.
bool isClosedContour() const
Returns true if subsequent calls to next() return kClose_Verb before returning kMove_Verb.
static SkPath Polygon(const std::initializer_list< SkPoint > &list, bool isClosed, SkPathFillType fillType=SkPathFillType::kWinding, bool isVolatile=false)
Definition: SkPath.h:85
SkPath & operator=(const SkPath &path)
Constructs a copy of an existing path.
void transform(const SkMatrix &matrix, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes)
Transforms verb array, SkPoint array, and weight by matrix.
Definition: SkPath.h:1348
SkPath & reverseAddPath(const SkPath &src)
Appends src to SkPath, from back to front.
Verb next(SkPoint[4])
Returns next SkPath::Verb in verb array, and advances RawIter.
bool isLastContourClosed() const
Returns if contour is closed.
SkScalar fY
y-axis value
Definition: SkPoint.h:162
Definition: SkPath.h:1603
SkPoint getPoint(int index) const
Returns SkPoint at index in SkPoint array.
void offset(SkScalar dx, SkScalar dy, SkPath *dst) const
Offsets SkPoint array by (dx, dy).
SkPath & moveTo(SkScalar x, SkScalar y)
Adds beginning of contour at SkPoint (x, y).
static SkPath Oval(const SkRect &, SkPathDirection, unsigned startIndex)
bool isRRect(SkRRect *rrect) const
Returns true if path is representable as SkRRect.
SkPath & reset()
Sets SkPath to its initial state.
bool contains(SkScalar x, SkScalar y) const
Returns true if the point (x, y) is contained by SkPath, taking into account FillType.
int countVerbs() const
Returns the number of verbs: kMove_Verb, kLine_Verb, kQuad_Verb, kConic_Verb, kCubic_Verb,...
@ kCubic_SkPathSegmentMask
Definition: SkPathTypes.h:47
SkPath & addRoundRect(const SkRect &rect, const SkScalar radii[], SkPathDirection dir=SkPathDirection::kCW)
Appends SkRRect to SkPath, creating a new closed contour.
bool isValid() const
Returns if SkPath data is consistent.
Definition: SkPath.h:1762
bool interpolate(const SkPath &ending, SkScalar weight, SkPath *out) const
Interpolates between SkPath with SkPoint array of equal size.
int getVerbs(uint8_t verbs[], int max) const
Returns the number of verbs in the path.
static int ConvertConicToQuads(const SkPoint &p0, const SkPoint &p1, const SkPoint &p2, SkScalar w, SkPoint pts[], int pow2)
Approximates conic with quad array.
size_t approximateBytesUsed() const
Returns the approximate byte size of the SkPath in memory.
SkPath & arcTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar radius)
Appends arc to SkPath, after appending line if needed.
SkPath & addPath(const SkPath &src, const SkMatrix &matrix, AddPathMode mode=kAppend_AddPathMode)
Appends src to SkPath, transformed by matrix.
SkPath & addRRect(const SkRRect &rrect, SkPathDirection dir, unsigned start)
Adds rrect to SkPath, creating a new closed contour.
ArcSize
Definition: SkPath.h:894
float SkScalar
Definition: SkScalar.h:16
SkPath & rArcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, ArcSize largeArc, SkPathDirection sweep, SkScalar dx, SkScalar dy)
Appends arc to SkPath, relative to last SkPath SkPoint.
size_t writeToMemory(void *buffer) const
Writes SkPath to buffer, returning the number of bytes written.
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.
Perform a series of path operations, optimized for unioning many paths together.
Definition: SkPathOps.h:86
SkPath & addOval(const SkRect &oval, SkPathDirection dir=SkPathDirection::kCW)
Adds oval to path, appending kMove_Verb, four kConic_Verb, and kClose_Verb.
SkPath & addRect(const SkRect &rect, SkPathDirection dir=SkPathDirection::kCW)
Definition: SkPath.h:1077
SkPath & quadTo(const SkPoint &p1, const SkPoint &p2)
Adds quad from last point towards SkPoint p1, to SkPoint p2.
Definition: SkPath.h:657
SkPath & lineTo(SkScalar x, SkScalar y)
Adds line from last point to (x, y).
SkScalar fX
x-axis value
Definition: SkPoint.h:161
bool isCloseLine() const
Returns true if last kLine_Verb returned by next() was generated by kClose_Verb.
Definition: SkPath.h:1499
static SkPath RRect(const SkRect &bounds, SkScalar rx, SkScalar ry, SkPathDirection dir=SkPathDirection::kCW)
bool isRect(SkRect *rect, bool *isClosed=nullptr, SkPathDirection *direction=nullptr) const
Returns true if SkPath is equivalent to SkRect when filled.
#define SkUNREACHABLE
Definition: SkTypes.h:256
SkPath & rLineTo(SkScalar dx, SkScalar dy)
Adds line from last point to vector (dx, dy).
friend SK_API bool operator==(const SkPath &a, const SkPath &b)
Compares a and b; returns true if SkPath::FillType, verb array, SkPoint array, and weights are equiva...
static SkMatrix SK_WARN_UNUSED_RESULT Scale(SkScalar sx, SkScalar sy)
Sets SkMatrix to scale by (sx, sy).
Definition: SkMatrix.h:69
Definition: SkMatrix.h:48
SkPath & rQuadTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2)
Adds quad from last point towards vector (dx1, dy1), to vector (dx2, dy2).
static bool IsCubicDegenerate(const SkPoint &p1, const SkPoint &p2, const SkPoint &p3, const SkPoint &p4, bool exact)
Tests if cubic is degenerate.
@ kCW
clockwise direction for adding closed contours
friend bool operator!=(const SkPath &a, const SkPath &b)
Compares a and b; returns true if SkPath::FillType, verb array, SkPoint array, and weights are not eq...
Definition: SkPath.h:158
SkPath & moveTo(const SkPoint &p)
Adds beginning of contour at SkPoint p.
Definition: SkPath.h:565
SkPath & addPath(const SkPath &src, AddPathMode mode=kAppend_AddPathMode)
Appends src to SkPath.
Definition: SkPath.h:1276
SkApplyPerspectiveClip
When we transform points through a matrix containing perspective (the bottom row is something other t...
Definition: SkMatrix.h:27
Definition: SkStream.h:227
SkPath makeTransform(const SkMatrix &m, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
Definition: SkPath.h:1353
void setFillType(SkPathFillType ft)
Sets FillType, the rule used to fill SkPath.
Definition: SkPath.h:208
SkPath & rMoveTo(SkScalar dx, SkScalar dy)
Adds beginning of contour relative to last point.
void updateBoundsCache() const
Updates internal bounds so that subsequent calls to getBounds() are instantaneous.
Definition: SkPath.h:497
Definition: SkPath.h:1433
bool isVolatile() const
Returns true if the path is volatile; it will not be altered or discarded by the caller after it is d...
Definition: SkPath.h:321
void toggleInverseFillType()
Replaces FillType with its inverse.
Definition: SkPath.h:222
@ kCubic
SkPath::RawIter returns 4 points.
uint32_t getSegmentMasks() const
Returns a mask, where each set bit corresponds to a SegmentMask constant if SkPath contains one or mo...
Definition: SkPath.h:1412
SkPath()
Constructs an empty SkPath.
SkPath(const SkPath &path)
Constructs a copy of an existing path.
@ kConic
SkPath::RawIter returns 3 points + 1 weight.
int countPoints() const
Returns the number of points in SkPath.
void dump() const
Definition: SkPath.h:1687
static bool IsLineDegenerate(const SkPoint &p1, const SkPoint &p2, bool exact)
Tests if line between SkPoint pair is degenerate.
bool isFinite() const
Returns true for finite SkPoint array values between negative SK_ScalarMax and positive SK_ScalarMax.
Definition: SkPath.h:309
void dumpHex() const
Definition: SkPath.h:1688
SkPath & setIsVolatile(bool isVolatile)
Specifies whether SkPath is volatile; whether it will be altered or discarded by the caller after it ...
Definition: SkPath.h:341
Definition: SkPathBuilder.h:16
bool isInterpolatable(const SkPath &compare) const
Returns true if SkPath contain equal verbs and equal weights.
SkScalar conicWeight() const
Returns conic weight if next() returned kConic_Verb.
Definition: SkPath.h:1653
RawIter(const SkPath &path)
Sets RawIter to return elements of verb array, SkPoint array, and conic weight in path.
Definition: SkPath.h:1618
void swap(SkPath &other)
Exchanges the verb array, SkPoint array, weights, and SkPath::FillType with other.
bool isOval(SkRect *bounds) const
Returns true if this path is recognized as an oval or circle.
static SkPath RRect(const SkRRect &, SkPathDirection, unsigned startIndex)
SkPath & arcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, ArcSize largeArc, SkPathDirection sweep, SkScalar x, SkScalar y)
Appends arc to SkPath.
@ kLarge_ArcSize
larger of arc pair
Definition: SkPath.h:896
static SkPath Rect(const SkRect &, SkPathDirection=SkPathDirection::kCW, unsigned startIndex=0)
SkPath & addRoundRect(const SkRect &rect, SkScalar rx, SkScalar ry, SkPathDirection dir=SkPathDirection::kCW)
Appends SkRRect to SkPath, creating a new closed contour.
Verb peek() const
Returns next SkPath::Verb, but does not advance RawIter.
Definition: SkPath.h:1642
bool isInverseFillType() const
Returns if FillType describes area outside SkPath geometry.
Definition: SkPath.h:217