Home | History | Annotate | Download | only in core

Lines Matching defs:SkPath

42 static bool is_degenerate(const SkPath& path) {
43 SkPath::Iter iter(path, false);
45 return SkPath::kDone_Verb == iter.next(pts);
50 SkAutoDisableDirectionCheck(SkPath* path) : fPath(path) {
59 SkPath* fPath;
78 SkAutoPathBoundsUpdate(SkPath* path, const SkRect& r) : fRect(r) {
82 SkAutoPathBoundsUpdate(SkPath* path, SkScalar left, SkScalar top,
89 fPath->setConvexity(fDegenerate ? SkPath::kConvex_Convexity
90 : SkPath::kUnknown_Convexity);
97 SkPath* fPath;
103 void init(SkPath* path) {
138 SkPath::SkPath()
144 void SkPath::resetFields() {
155 SkPath::SkPath(const SkPath& that)
161 SkPath::~SkPath() {
165 SkPath& SkPath::operator=(const SkPath& that) {
176 void SkPath::copyFields(const SkPath& that) {
187 bool operator==(const SkPath& a, const SkPath& b) {
194 void SkPath::swap(SkPath& that) {
212 bool SkPath::isInterpolatable(const SkPath& compare) const {
229 bool SkPath::interpolate(const SkPath& ending, SkScalar weight, SkPath* out) const {
269 bool SkPath::conservativelyContainsRect(const SkRect& rect) const {
282 SkPath::Iter iter(*this, true);
283 SkPath::Verb verb;
320 if (SkPath::kConic_Verb == verb) {
348 uint32_t SkPath::getGenerationID() const {
357 void SkPath::reset() {
364 void SkPath::rewind() {
371 bool SkPath::isLastContourClosed() const {
379 bool SkPath::isLine(SkPoint line[2]) const {
446 bool SkPath::isRectContour(bool allowPartial, int* currVerb, const SkPoint** ptsPtr,
571 bool SkPath::isRect(SkRect* rect, bool* isClosed, Direction* direction) const {
591 bool SkPath::isNestedFillRects(SkRect rects[2], Direction dirs[2]) const {
635 int SkPath::countPoints() const {
639 int SkPath::getPoints(SkPoint dst[], int max) const {
649 SkPoint SkPath::getPoint(int index) const {
656 int SkPath::countVerbs() const {
668 int SkPath::getVerbs(uint8_t dst[], int max) const {
678 bool SkPath::getLastPt(SkPoint* lastPt) const {
694 void SkPath::setPt(int index, SkScalar x, SkScalar y) {
706 void SkPath::setLastPt(SkScalar x, SkScalar y) {
718 void SkPath::setConvexity(Convexity c) {
733 void SkPath::incReserve(U16CPU inc) {
739 void SkPath::moveTo(SkScalar x, SkScalar y) {
752 void SkPath::rMoveTo(SkScalar x, SkScalar y) {
758 void SkPath::injectMoveToIfNeeded() {
772 void SkPath::lineTo(SkScalar x, SkScalar y) {
783 void SkPath::rLineTo(SkScalar x, SkScalar y) {
790 void SkPath::quadTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) {
803 void SkPath::rQuadTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) {
810 void SkPath::conicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
834 void SkPath::rConicTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2,
842 void SkPath::cubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
857 void SkPath::rCubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
866 void SkPath::close() {
907 PointIterator(SkPath::Direction dir, unsigned startIndex)
909 , fAdvance(dir == SkPath::kCW_Direction ? 1 : N - 1) { }
931 RectPointIterator(const SkRect& rect, SkPath::Direction dir, unsigned startIndex)
943 OvalPointIterator(const SkRect& oval, SkPath::Direction dir, unsigned startIndex)
958 RRectPointIterator(const SkRRect& rrect, SkPath::Direction dir, unsigned startIndex)
981 SkASSERT(SkPath::kCW_Direction == dir || SkPath::kCCW_Direction == dir);
984 void SkPath::addRect(const SkRect& rect, Direction dir) {
988 void SkPath::addRect(SkScalar left, SkScalar top, SkScalar right,
993 void SkPath::addRect(const SkRect &rect, Direction dir, unsigned startIndex) {
1016 void SkPath::addPoly(const SkPoint pts[], int count, bool close) {
1115 void SkPath::addRoundRect(const SkRect& rect, const SkScalar radii[],
1122 void SkPath::addRRect(const SkRRect& rrect, Direction dir) {
1127 void SkPath::addRRect(const SkRRect &rrect, Direction dir, unsigned startIndex) {
1187 bool SkPath::hasOnlyMoveTos() const {
1202 bool SkPath::isZeroLengthSincePoint(int startPtIndex) const {
1217 void SkPath::addRoundRect(const SkRect& rect, SkScalar rx, SkScalar ry,
1230 void SkPath::addOval(const SkRect& oval, Direction dir) {
1235 void SkPath::addOval(const SkRect &oval, Direction dir, unsigned startPointIndex) {
1276 void SkPath::addCircle(SkScalar x, SkScalar y, SkScalar r, Direction dir) {
1282 void SkPath::arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
1342 void SkPath::arcTo(SkScalar rx, SkScalar ry, SkScalar angle, SkPath::ArcSize arcLarge,
1343 SkPath::Direction arcSweep, SkScalar x, SkScalar y) {
1465 void SkPath::rArcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, SkPath::ArcSize largeArc,
1466 SkPath::Direction sweep, SkScalar dx, SkScalar dy) {
1472 void SkPath::addArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle) {
1481 // See SkPath::addOval() docs.
1501 void SkPath::arcTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar radius) {
1539 void SkPath::addPath(const SkPath& path, SkScalar dx, SkScalar dy, AddPathMode mode) {
1546 void SkPath::addPath(const SkPath& path, const SkMatrix& matrix, AddPathMode mode) {
1610 void SkPath::reversePathTo(const SkPath& path) {
1649 void SkPath::reverseAddPath(const SkPath& src) {
1702 void SkPath::offset(SkScalar dx, SkScalar dy, SkPath* dst) const {
1709 static void subdivide_cubic_to(SkPath* path, const SkPoint pts[4],
1722 void SkPath::transform(const SkMatrix& matrix, SkPath* dst) const {
1725 dst = (SkPath*)this;
1729 SkPath tmp;
1732 SkPath::Iter iter(*this, false);
1734 SkPath::Verb verb;
1811 SkPath::Iter::Iter() {
1825 SkPath::Iter::Iter(const SkPath& path, bool forceClose) {
1829 void SkPath::Iter::setPath(const SkPath& path, bool forceClose) {
1844 bool SkPath::Iter::isClosedContour() const {
1872 SkPath::Verb SkPath::Iter::autoClose(SkPoint pts[2]) {
1894 const SkPoint& SkPath::Iter::cons_moveTo() {
1906 void SkPath::Iter::consumeDegenerateSegments(bool exact) {
1989 SkPath::Verb SkPath::Iter::doNext(SkPoint ptsParam[4]) {
2072 size_t SkPath::writeToMemoryAsRRect(int32_t packedHeader, void* storage) const {
2102 size_t SkPath::writeToMemory(void* storage) const {
2131 sk_sp<SkData> SkPath::serialize() const {
2138 size_t SkPath::readFromMemory(const void* storage, size_t length) {
2251 void SkPath::dump(SkWStream* wStream, bool forceClose, bool dumpAsHex) const {
2264 builder.printf("path.setFillType(SkPath::k%s_FillType);\n",
2301 void SkPath::dump() const {
2305 void SkPath::dumpHex() const {
2310 bool SkPath::isValidImpl() const {
2373 // no need to check for small numbers because SkPath::Iter has removed degenerate values
2388 , fConvexity(SkPath::kConvex_Convexity)
2405 SkPath::Convexity getConvexity() const { return fConvexity; }
2411 if (SkPath::kConcave_Convexity == fConvexity || !fIsFinite) {
2442 fConvexity = SkPath::kConcave_Convexity;
2517 fConvexity = SkPath::kConcave_Convexity;
2547 SkPath::Convexity fConvexity;
2555 SkPath::Convexity SkPath::internalGetConvexity() const {
2558 SkPath::Verb verb;
2559 SkPath::Iter iter(*this, true);
2568 while ((verb = iter.next(pts, false, false)) != SkPath::kDone_Verb) {
2670 SkASSERT(SkPath::kMove_Verb == fCurrVerb[~0]);
2676 case SkPath::kMove_Verb:
2678 case SkPath::kLine_Verb:
2681 case SkPath::kConic_Verb:
2684 case SkPath::kQuad_Verb:
2687 case SkPath::kCubic_Verb:
2690 case SkPath::kClose_Verb:
2794 bool SkPathPriv::CheapComputeFirstDirection(const SkPath& path, FirstDirection* dir) {
2802 if (SkPath::kConvex_Convexity == path.getConvexityOrUnknown()) {
3284 bool SkPath::contains(SkScalar x, SkScalar y) const {
3294 SkPath::Iter iter(*this, true);
3301 case SkPath::kMove_Verb:
3302 case SkPath::kClose_Verb:
3304 case SkPath::kLine_Verb:
3307 case SkPath::kQuad_Verb:
3310 case SkPath::kConic_Verb:
3313 case SkPath::kCubic_Verb:
3316 case SkPath::kDone_Verb:
3321 bool evenOddFill = SkPath::kEvenOdd_FillType == this->getFillType()
3322 || SkPath::kInverseEvenOdd_FillType == this->getFillType();
3344 case SkPath::kMove_Verb:
3345 case SkPath::kClose_Verb:
3347 case SkPath::kLine_Verb:
3350 case SkPath::kQuad_Verb:
3353 case SkPath::kConic_Verb:
3356 case SkPath::kCubic_Verb:
3359 case SkPath::kDone_Verb:
3385 int SkPath::ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const SkPoint& p2,
3391 bool SkPathPriv::IsSimpleClosedRect(const SkPath& path, SkRect* rect, SkPath::Direction* direction,
3393 if (path.getSegmentMasks() != SkPath::kLine_SegmentMask) {
3396 SkPath::RawIter iter(path);
3398 SkPath::Verb v;
3401 while ((v = iter.next(verbPts)) != SkPath::kDone_Verb) {
3403 case SkPath::kMove_Verb:
3410 case SkPath::kLine_Verb:
3417 case SkPath::kClose_Verb:
3461 *direction = vec03IsVertical ? SkPath::kCW_Direction : SkPath::kCCW_Direction;
3466 *direction = vec03IsVertical ? SkPath::kCCW_Direction : SkPath::kCW_Direction;
3471 *direction = vec03IsVertical ? SkPath::kCCW_Direction : SkPath::kCW_Direction;
3476 *direction = vec03IsVertical ? SkPath::kCW_Direction : SkPath::kCCW_Direction;
3483 void SkPathPriv::CreateDrawArcPath(SkPath* path, const SkRect& oval, SkScalar startAngle,
3490 path->setFillType(SkPath::kWinding_FillType);
3562 SkRect SkPath::computeTightBounds() const {
3567 if (this->getSegmentMasks() == SkPath::kLine_SegmentMask) {
3573 SkPath::RawIter iter(*this);
3581 case SkPath::kMove_Verb:
3585 case SkPath::kLine_Verb:
3589 case SkPath::kQuad_Verb:
3592 case SkPath::kConic_Verb:
3595 case SkPath::kCubic_Verb:
3598 case SkPath::kClose_Verb:
3600 case SkPath::kDone_Verb:
3616 bool SkPath::IsLineDegenerate(const SkPoint& p1, const SkPoint& p2, bool exact) {
3620 bool SkPath::IsQuadDegenerate(const SkPoint& p1, const SkPoint& p2,
3626 bool SkPath::IsCubicDegenerate(const SkPoint& p1, const SkPoint& p2,