Home | History | Annotate | Download | only in core

Lines Matching defs:SkPath

13 #include "SkPath.h"
32 static bool is_degenerate(const SkPath& path) {
33 SkPath::Iter iter(path, false);
35 return SkPath::kDone_Verb == iter.next(pts);
40 SkAutoDisableDirectionCheck(SkPath* path) : fPath(path) {
41 fSaved = static_cast<SkPath::Direction>(fPath->fDirection);
49 SkPath* fPath;
50 SkPath::Direction fSaved;
68 SkAutoPathBoundsUpdate(SkPath* path, const SkRect& r) : fRect(r) {
72 SkAutoPathBoundsUpdate(SkPath* path, SkScalar left, SkScalar top,
79 fPath->setConvexity(fDegenerate ? SkPath::kConvex_Convexity
80 : SkPath::kUnknown_Convexity);
87 SkPath* fPath;
93 void init(SkPath* path) {
128 SkPath::SkPath()
137 void SkPath::resetFields() {
148 SkPath::SkPath(const SkPath& that)
157 SkPath::~SkPath() {
161 SkPath& SkPath::operator=(const SkPath& that) {
175 void SkPath::copyFields(const SkPath& that) {
183 bool operator==(const SkPath& a, const SkPath& b) {
190 void SkPath::swap(SkPath& that) {
200 SkTSwap<const SkPath*>(fSourcePath, that.fSourcePath);
208 SkPath::Direction dir) {
211 if (SkPath::kCW_Direction == dir) {
231 bool SkPath::conservativelyContainsRect(const SkRect& rect) const {
245 SkPath::Verb verb;
292 uint32_t SkPath::getGenerationID() const {
302 const SkPath* SkPath::getSourcePath() const {
306 void SkPath::setSourcePath(const SkPath* path) {
311 void SkPath::reset() {
318 void SkPath::rewind() {
325 bool SkPath::isLine(SkPoint line[2]) const {
392 bool SkPath::isRectContour(bool allowPartial, int* currVerb, const SkPoint** ptsPtr,
507 SkPath::PathAsRect SkPath::asRect(Direction* direction) const {
515 bool SkPath::isRect(SkRect* rect) const {
526 bool SkPath::isRect(bool* isClosed, Direction* direction) const {
533 bool SkPath::isNestedRects(SkRect rects[2], Direction dirs[2]) const {
573 int SkPath::countPoints() const {
577 int SkPath::getPoints(SkPoint dst[], int max) const {
587 SkPoint SkPath::getPoint(int index) const {
594 int SkPath::countVerbs() const {
606 int SkPath::getVerbs(uint8_t dst[], int max) const {
616 bool SkPath::getLastPt(SkPoint* lastPt) const {
632 void SkPath::setLastPt(SkScalar x, SkScalar y) {
644 void SkPath::setConvexity(Convexity c) {
659 void SkPath::incReserve(U16CPU inc) {
665 void SkPath::moveTo(SkScalar x, SkScalar y) {
676 void SkPath::rMoveTo(SkScalar x, SkScalar y) {
682 void SkPath::injectMoveToIfNeeded() {
696 void SkPath::lineTo(SkScalar x, SkScalar y) {
707 void SkPath::rLineTo(SkScalar x, SkScalar y) {
714 void SkPath::quadTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) {
727 void SkPath::rQuadTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) {
734 void SkPath::conicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
758 void SkPath::rConicTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2,
766 void SkPath::cubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
781 void SkPath::rCubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
790 void SkPath::close() {
827 SkASSERT(SkPath::kCW_Direction == dir || SkPath::kCCW_Direction == dir);
830 void SkPath::addRect(const SkRect& rect, Direction dir) {
834 void SkPath::addRect(SkScalar left, SkScalar top, SkScalar right,
857 void SkPath::addPoly(const SkPoint pts[], int count, bool close) {
945 void SkPath::addRoundRect(const SkRect& rect, const SkScalar radii[],
1004 static void add_corner_quads(SkPath* path, const SkRRect& rrect,
1005 SkRRect::Corner corner, SkPath::Direction dir) {
1022 if ((corner & 1) == (dir == SkPath::kCCW_Direction)) { // corners always alternate direction
1023 SkASSERT(dir == SkPath::kCCW_Direction
1079 void SkPath::addRRect(const SkRRect& rrect, Direction dir) {
1123 bool SkPath::hasOnlyMoveTos() const {
1142 void SkPath::addRoundRect(const SkRect& rect, SkScalar rx, SkScalar ry,
1148 "I got %f and %f as radii to SkPath::AddRoundRect, "
1246 void SkPath::addOval(const SkRect& oval, Direction dir) {
1315 void SkPath::addCircle(SkScalar x, SkScalar y, SkScalar r, Direction dir) {
1323 void SkPath::arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
1343 void SkPath::addArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle) {
1379 void SkPath::arcTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
1446 void SkPath::addPath(const SkPath& path, SkScalar dx, SkScalar dy, AddPathMode mode) {
1453 void SkPath::addPath(const SkPath& path, const SkMatrix& matrix, AddPathMode mode) {
1517 void SkPath::reversePathTo(const SkPath& path) {
1538 conicWeights += (SkPath::kConic_Verb == v);
1564 void SkPath::reverseAddPath(const SkPath& src) {
1617 void SkPath::offset(SkScalar dx, SkScalar dy, SkPath* dst) const {
1626 static void subdivide_quad_to(SkPath* path, const SkPoint pts[3],
1639 static void subdivide_cubic_to(SkPath* path, const SkPoint pts[4],
1652 void SkPath::transform(const SkMatrix& matrix, SkPath* dst) const {
1655 dst = (SkPath*)this;
1659 SkPath tmp;
1662 SkPath::Iter iter(*this, false);
1664 SkPath::Verb verb;
1712 dst->fDirection = SkPath::OppositeDirection(static_cast<Direction>(fDirection));
1737 SkPath::Iter::Iter() {
1751 SkPath::Iter::Iter(const SkPath& path, bool forceClose) {
1755 void SkPath::Iter::setPath(const SkPath& path, bool forceClose) {
1767 bool SkPath::Iter::isClosedContour() const {
1795 SkPath::Verb SkPath::Iter::autoClose(SkPoint pts[2]) {
1817 const SkPoint& SkPath::Iter::cons_moveTo() {
1829 void SkPath::Iter::consumeDegenerateSegments() {
1907 SkPath::Verb SkPath::Iter::doNext(SkPoint ptsParam[4]) {
1986 SkPath::RawIter::RawIter() {
1997 SkPath::RawIter::RawIter(const SkPath& path) {
2001 void SkPath::RawIter::setPath(const SkPath& path) {
2010 SkPath::Verb SkPath::RawIter::next(SkPoint pts[4]) {
2063 size_t SkPath::writeToMemory(void* storage) const {
2085 size_t SkPath::readFromMemory(const void* storage, size_t length) {
2145 void SkPath::dump(bool forceClose, const char title[]) const {
2184 void SkPath::dump() const {
2189 void SkPath::validate() const {
2234 // no need to check for small numbers because SkPath::Iter has removed degenerate values
2244 , fConvexity(SkPath::kConvex_Convexity)
2245 , fDirection(SkPath::kUnknown_Direction) {
2257 SkPath::Convexity getConvexity() const { return fConvexity; }
2260 SkPath::Direction getDirection() const { return fDirection; }
2263 if (SkPath::kConcave_Convexity == fConvexity) {
2290 fConvexity = SkPath::kConcave_Convexity;
2313 fDirection = (1 == sign) ? SkPath::kCW_Direction : SkPath::kCCW_Direction;
2315 fConvexity = SkPath::kConcave_Convexity;
2316 fDirection = SkPath::kUnknown_Direction;
2329 SkPath::Convexity fConvexity;
2330 SkPath::Direction fDirection;
2334 SkPath::Convexity SkPath::internalGetConvexity() const {
2337 SkPath::Verb verb;
2338 SkPath::Iter iter(*this, true);
2344 while ((verb = iter.next(pts)) != SkPath::kDone_Verb) {
2428 SkASSERT(SkPath::kMove_Verb == fCurrVerb[~0]);
2434 case SkPath::kMove_Verb:
2436 case SkPath::kLine_Verb:
2439 case SkPath::kConic_Verb:
2442 case SkPath::kQuad_Verb:
2445 case SkPath::kCubic_Verb:
2448 case SkPath::kClose_Verb:
2540 static void crossToDir(SkScalar cross, SkPath::Direction* dir) {
2541 *dir = cross > 0 ? SkPath::kCW_Direction : SkPath::kCCW_Direction;
2552 bool SkPath::cheapComputeDirection(Direction* dir) const {
2846 bool SkPath::contains(SkScalar x, SkScalar y) const {
2856 SkPath::Iter iter(*this, true);
2862 case SkPath::kMove_Verb:
2863 case SkPath::kClose_Verb:
2865 case SkPath::kLine_Verb:
2868 case SkPath::kQuad_Verb:
2871 case SkPath::kConic_Verb:
2874 case SkPath::kCubic_Verb:
2877 case SkPath::kDone_Verb:
2884 case SkPath::kEvenOdd_FillType:
2885 case SkPath::kInverseEvenOdd_FillType: