Lines Matching refs:SkPath
8 #include "include/core/SkPath.h"
38 static_assert(sizeof(SkPath) == sizeof(SkPath_Storage_Equivalent),
39 "Please keep an eye on SkPath packing.");
63 static bool is_degenerate(const SkPath& path) {
69 SkAutoDisableDirectionCheck(SkPath* path) : fPath(path) {
78 SkPath* fPath;
96 SkAutoPathBoundsUpdate(SkPath* path, const SkRect& r) : fPath(path), fRect(r) {
118 SkPath* fPath;
146 SkPath::SkPath()
152 SkPath::SkPath(sk_sp<SkPathRef> pr, SkPathFillType ft, bool isVolatile, SkPathConvexity ct,
162 void SkPath::resetFields() {
173 SkPath::SkPath(const SkPath& that)
179 SkPath::~SkPath() {
183 SkPath& SkPath::operator=(const SkPath& that) {
194 void SkPath::copyFields(const SkPath& that) {
205 bool operator==(const SkPath& a, const SkPath& b) {
212 void SkPath::swap(SkPath& that) {
236 bool SkPath::isInterpolatable(const SkPath& compare) const {
243 bool SkPath::interpolate(const SkPath& ending, SkScalar weight, SkPath* out) const {
283 bool SkPath::conservativelyContainsRect(const SkRect& rect) const {
350 uint32_t SkPath::getGenerationID() const {
359 SkPath& SkPath::reset() {
367 SkPath& SkPath::rewind() {
375 bool SkPath::isLastContourClosed() const {
383 bool SkPath::isLine(SkPoint line[2]) const {
451 bool SkPath::isRect(SkRect* rect, bool* isClosed, SkPathDirection* direction) const {
458 bool SkPath::isOval(SkRect* bounds) const {
462 bool SkPath::isRRect(SkRRect* rrect) const {
466 int SkPath::countPoints() const {
470 int SkPath::getPoints(SkPoint dst[], int max) const {
480 SkPoint SkPath::getPoint(int index) const {
487 int SkPath::countVerbs() const {
491 int SkPath::getVerbs(uint8_t dst[], int max) const {
503 size_t SkPath::approximateBytesUsed() const {
504 size_t size = sizeof (SkPath);
511 bool SkPath::getLastPt(SkPoint* lastPt) const {
527 void SkPath::setPt(int index, SkScalar x, SkScalar y) {
539 void SkPath::setLastPt(SkScalar x, SkScalar y) {
552 void SkPath::setConvexity(SkPathConvexity c) {
557 void SkPath::setConvexity(SkPathConvexity c) const {
560 void SkPath::setFirstDirection(SkPathFirstDirection d) const {
563 SkPathFirstDirection SkPath::getFirstDirection() const {
567 bool SkPath::isConvexityAccurate() const {
579 SkPathConvexity SkPath::getConvexity() const {
593 SkPath& SkPath::dirtyAfterEdit() {
609 void SkPath::incReserve(int inc) {
617 SkPath& SkPath::moveTo(SkScalar x, SkScalar y) {
630 SkPath& SkPath::rMoveTo(SkScalar x, SkScalar y) {
643 void SkPath::injectMoveToIfNeeded() {
657 SkPath& SkPath::lineTo(SkScalar x, SkScalar y) {
668 SkPath& SkPath::rLineTo(SkScalar x, SkScalar y) {
675 SkPath& SkPath::quadTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) {
688 SkPath& SkPath::rQuadTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) {
695 SkPath& SkPath::conicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
720 SkPath& SkPath::rConicTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2,
728 SkPath& SkPath::cubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
743 SkPath& SkPath::rCubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
752 SkPath& SkPath::close() {
793 SkPath& SkPath::addRect(const SkRect &rect, SkPathDirection dir, unsigned startIndex) {
817 SkPath& SkPath::addPoly(const SkPoint pts[], int count, bool close) {
922 SkPath& SkPath::addRoundRect(const SkRect& rect, const SkScalar radii[],
929 SkPath& SkPath::addRRect(const SkRRect& rrect, SkPathDirection dir) {
934 SkPath& SkPath::addRRect(const SkRRect &rrect, SkPathDirection dir, unsigned startIndex) {
995 bool SkPath::hasOnlyMoveTos() const {
1010 bool SkPath::isZeroLengthSincePoint(int startPtIndex) const {
1025 SkPath& SkPath::addRoundRect(const SkRect& rect, SkScalar rx, SkScalar ry,
1038 SkPath& SkPath::addOval(const SkRect& oval, SkPathDirection dir) {
1043 SkPath& SkPath::addOval(const SkRect &oval, SkPathDirection dir, unsigned startPointIndex) {
1085 SkPath& SkPath::addCircle(SkScalar x, SkScalar y, SkScalar r, SkPathDirection dir) {
1092 SkPath& SkPath::arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
1164 SkPath& SkPath::arcTo(SkScalar rx, SkScalar ry, SkScalar angle, SkPath::ArcSize arcLarge,
1295 SkPath& SkPath::rArcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, SkPath::ArcSize largeArc,
1303 SkPath& SkPath::addArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle) {
1312 // See SkPath::addOval() docs.
1331 SkPath& SkPath::arcTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar radius) {
1367 SkPath& SkPath::addPath(const SkPath& path, SkScalar dx, SkScalar dy, AddPathMode mode) {
1374 SkPath& SkPath::addPath(const SkPath& srcPath, const SkMatrix& matrix, AddPathMode mode) {
1380 const SkPath* src = &srcPath;
1381 SkTLazy<SkPath> tmp;
1395 // fiddle with fLastMoveToIndex, as we do in SkPath::close()
1449 SkPath& SkPath::reversePathTo(const SkPath& path) {
1489 SkPath& SkPath::reverseAddPath(const SkPath& srcPath) {
1491 const SkPath* src = &srcPath;
1492 SkTLazy<SkPath> tmp;
1547 void SkPath::offset(SkScalar dx, SkScalar dy, SkPath* dst) const {
1554 static void subdivide_cubic_to(SkPath* path, const SkPoint pts[4],
1567 void SkPath::transform(const SkMatrix& matrix, SkPath* dst, SkApplyPerspectiveClip pc) const {
1577 dst = (SkPath*)this;
1581 SkPath tmp;
1584 SkPath clipped;
1585 const SkPath* src = this;
1592 SkPath::Iter iter(*src, false);
1594 SkPath::Verb verb;
1676 SkPath::Iter::Iter() {
1689 SkPath::Iter::Iter(const SkPath& path, bool forceClose) {
1693 void SkPath::Iter::setPath(const SkPath& path, bool forceClose) {
1707 bool SkPath::Iter::isClosedContour() const {
1735 SkPath::Verb SkPath::Iter::autoClose(SkPoint pts[2]) {
1757 SkPath::Verb SkPath::Iter::next(SkPoint ptsParam[4]) {
1831 void SkPath::RawIter::setPath(const SkPath& path) {
1837 SkPath::Verb SkPath::RawIter::next(SkPoint pts[4]) {
1900 void SkPath::dump(SkWStream* wStream, bool dumpAsHex) const {
1950 void SkPath::dump(std::string& desc, int depth) const {
1952 desc += split + "\n SkPath:{ \n";
1964 descSk.printf("path.setFillType(SkPath::k%s_FillType);\n", gFillTypeStrs[(int) this->getFillType()]);
1996 void SkPath::dumpArrays(SkWStream* wStream, bool dumpAsHex) const {
2052 builder.appendf("SkPath path = SkPath::Make(path_points, %d, path_verbs, %d, %s, %d,\n",
2066 bool SkPath::isValidImpl() const {
2259 SkPathConvexity SkPath::computeConvexity() const {
2407 SkASSERT(SkPath::kMove_Verb == fCurrVerb[0]);
2413 case SkPath::kMove_Verb:
2415 case SkPath::kLine_Verb:
2418 case SkPath::kConic_Verb:
2421 case SkPath::kQuad_Verb:
2424 case SkPath::kCubic_Verb:
2427 case SkPath::kClose_Verb:
2531 SkPathFirstDirection SkPathPriv::ComputeFirstDirection(const SkPath& path) {
3022 bool SkPath::contains(SkScalar x, SkScalar y) const {
3032 SkPath::Iter iter(*this, true);
3039 case SkPath::kMove_Verb:
3040 case SkPath::kClose_Verb:
3042 case SkPath::kLine_Verb:
3045 case SkPath::kQuad_Verb:
3048 case SkPath::kConic_Verb:
3051 case SkPath::kCubic_Verb:
3054 case SkPath::kDone_Verb:
3082 case SkPath::kMove_Verb:
3083 case SkPath::kClose_Verb:
3085 case SkPath::kLine_Verb:
3088 case SkPath::kQuad_Verb:
3091 case SkPath::kConic_Verb:
3094 case SkPath::kCubic_Verb:
3097 case SkPath::kDone_Verb:
3123 int SkPath::ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const SkPoint& p2,
3129 bool SkPathPriv::IsSimpleRect(const SkPath& path, bool isSimpleFill, SkRect* rect,
3131 if (path.getSegmentMasks() != SkPath::kLine_SegmentMask) {
3239 void SkPathPriv::CreateDrawArcPath(SkPath* path, const SkRect& oval, SkScalar startAngle,
3328 SkRect SkPath::computeTightBounds() const {
3333 if (this->getSegmentMasks() == SkPath::kLine_SegmentMask) {
3377 bool SkPath::IsLineDegenerate(const SkPoint& p1, const SkPoint& p2, bool exact) {
3381 bool SkPath::IsQuadDegenerate(const SkPoint& p1, const SkPoint& p2,
3387 bool SkPath::IsCubicDegenerate(const SkPoint& p1, const SkPoint& p2,
3442 SkPath SkPath::Make(const SkPoint pts[], int pointCount,
3447 return SkPath();
3453 return SkPath();
3456 return SkPath(sk_sp<SkPathRef>(new SkPathRef(SkTDArray<SkPoint>(pts, info.points),
3463 SkPath SkPath::Rect(const SkRect& r, SkPathDirection dir, unsigned startIndex) {
3467 SkPath SkPath::Oval(const SkRect& r, SkPathDirection dir) {
3471 SkPath SkPath::Oval(const SkRect& r, SkPathDirection dir, unsigned startIndex) {
3475 SkPath SkPath::Circle(SkScalar x, SkScalar y, SkScalar r, SkPathDirection dir) {
3479 SkPath SkPath::RRect(const SkRRect& rr, SkPathDirection dir) {
3483 SkPath SkPath::RRect(const SkRRect& rr, SkPathDirection dir, unsigned startIndex) {
3487 SkPath SkPath::RRect(const SkRect& r, SkScalar rx, SkScalar ry, SkPathDirection dir) {
3491 SkPath SkPath::Polygon(const SkPoint pts[], int count, bool isClosed,
3501 bool SkPathPriv::IsRectContour(const SkPath& path, bool allowPartial, int* currVerb,
3520 uint8_t verb = insertClose ? (uint8_t) SkPath::kClose_Verb : path.fPathRef->atVerb(*currVerb);
3522 case SkPath::kClose_Verb:
3527 case SkPath::kLine_Verb: {
3528 if (SkPath::kClose_Verb != verb) {
3531 SkPoint lineEnd = SkPath::kClose_Verb == verb ? *firstPt : *pts++;
3558 if (3 == corners && SkPath::kLine_Verb == verb) {
3587 case SkPath::kQuad_Verb:
3588 case SkPath::kConic_Verb:
3589 case SkPath::kCubic_Verb:
3591 case SkPath::kMove_Verb:
3642 bool SkPathPriv::IsNestedFillRects(const SkPath& path, SkRect rects[2], SkPathDirection dirs[2]) {
3756 static SkPath clip(const SkPath& path, const SkHalfPlane& plane) {
3763 return SkPath();
3766 SkPath rotated;
3769 return SkPath();
3786 SkPath::Verb verb;
3787 while ((verb = clipper->next(pts)) != SkPath::kDone_Verb) {
3799 case SkPath::kLine_Verb:
3803 case SkPath::kQuad_Verb:
3807 case SkPath::kCubic_Verb:
3818 SkPath result = rec.fResult.detach().makeTransform(mx);
3820 result = SkPath();
3826 bool SkPathPriv::PerspectiveClip(const SkPath& path, const SkMatrix& matrix, SkPath* clippedPath) {
3848 *clippedPath = SkPath();
3852 int SkPathPriv::GenIDChangeListenersCount(const SkPath& path) {
3856 bool SkPathPriv::IsAxisAligned(const SkPath& path) {