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) {
678 void SkPath::rMoveTo(SkScalar x, SkScalar y) {
684 void SkPath::injectMoveToIfNeeded() {
698 void SkPath::lineTo(SkScalar x, SkScalar y) {
709 void SkPath::rLineTo(SkScalar x, SkScalar y) {
716 void SkPath::quadTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) {
729 void SkPath::rQuadTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) {
736 void SkPath::conicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
760 void SkPath::rConicTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2,
768 void SkPath::cubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
783 void SkPath::rCubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
792 void SkPath::close() {
829 SkASSERT(SkPath::kCW_Direction == dir || SkPath::kCCW_Direction == dir);
832 void SkPath::addRect(const SkRect& rect, Direction dir) {
836 void SkPath::addRect(SkScalar left, SkScalar top, SkScalar right,
859 void SkPath::addPoly(const SkPoint pts[], int count, bool close) {
947 void SkPath::addRoundRect(const SkRect& rect, const SkScalar radii[],
1006 static void add_corner_quads(SkPath* path, const SkRRect& rrect,
1007 SkRRect::Corner corner, SkPath::Direction dir) {
1024 if ((corner & 1) == (dir == SkPath::kCCW_Direction)) { // corners always alternate direction
1025 SkASSERT(dir == SkPath::kCCW_Direction
1081 void SkPath::addRRect(const SkRRect& rrect, Direction dir) {
1120 bool SkPath::hasOnlyMoveTos() const {
1135 void SkPath::addRoundRect(const SkRect& rect, SkScalar rx, SkScalar ry,
1141 "I got %f and %f as radii to SkPath::AddRoundRect, "
1152 void SkPath::addOval(const SkRect& oval, Direction dir) {
1221 void SkPath::addCircle(SkScalar x, SkScalar y, SkScalar r, Direction dir) {
1229 void SkPath::arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
1249 void SkPath::addArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle) {
1285 void SkPath::arcTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
1352 void SkPath::addPath(const SkPath& path, SkScalar dx, SkScalar dy, AddPathMode mode) {
1359 void SkPath::addPath(const SkPath& path, const SkMatrix& matrix, AddPathMode mode) {
1423 void SkPath::reversePathTo(const SkPath& path) {
1444 conicWeights += (SkPath::kConic_Verb == v);
1470 void SkPath::reverseAddPath(const SkPath& src) {
1523 void SkPath::offset(SkScalar dx, SkScalar dy, SkPath* dst) const {
1532 static void subdivide_quad_to(SkPath* path, const SkPoint pts[3],
1545 static void subdivide_cubic_to(SkPath* path, const SkPoint pts[4],
1558 void SkPath::transform(const SkMatrix& matrix, SkPath* dst) const {
1561 dst = (SkPath*)this;
1565 SkPath tmp;
1568 SkPath::Iter iter(*this, false);
1570 SkPath::Verb verb;
1618 dst->fDirection = SkPath::OppositeDirection(static_cast<Direction>(fDirection));
1643 SkPath::Iter::Iter() {
1657 SkPath::Iter::Iter(const SkPath& path, bool forceClose) {
1661 void SkPath::Iter::setPath(const SkPath& path, bool forceClose) {
1673 bool SkPath::Iter::isClosedContour() const {
1701 SkPath::Verb SkPath::Iter::autoClose(SkPoint pts[2]) {
1723 const SkPoint& SkPath::Iter::cons_moveTo() {
1735 void SkPath::Iter::consumeDegenerateSegments() {
1813 SkPath::Verb SkPath::Iter::doNext(SkPoint ptsParam[4]) {
1892 SkPath::RawIter::RawIter() {
1903 SkPath::RawIter::RawIter(const SkPath& path) {
1907 void SkPath::RawIter::setPath(const SkPath& path) {
1916 SkPath::Verb SkPath::RawIter::next(SkPoint pts[4]) {
1969 size_t SkPath::writeToMemory(void* storage) const {
1991 size_t SkPath::readFromMemory(const void* storage, size_t length) {
2056 void SkPath::dump(SkWStream* wStream, bool forceClose, bool dumpAsHex) const {
2099 void SkPath::dump() const {
2103 void SkPath::dumpHex() const {
2108 void SkPath::validate() const {
2163 // no need to check for small numbers because SkPath::Iter has removed degenerate values
2197 , fConvexity(SkPath::kConvex_Convexity)
2198 , fDirection(SkPath::kUnknown_Direction) {
2210 SkPath::Convexity getConvexity() const { return fConvexity; }
2213 SkPath::Direction getDirection() const { return fDirection; }
2216 if (SkPath::kConcave_Convexity == fConvexity) {
2243 fConvexity = SkPath::kConcave_Convexity;
2264 fDirection = (kRight_DirChange == dir) ? SkPath::kCW_Direction
2265 : SkPath::kCCW_Direction;
2267 fConvexity = SkPath::kConcave_Convexity;
2268 fDirection = SkPath::kUnknown_Direction;
2290 SkPath::Convexity fConvexity;
2291 SkPath::Direction fDirection;
2295 SkPath::Convexity SkPath::internalGetConvexity() const {
2298 SkPath::Verb verb;
2299 SkPath::Iter iter(*this, true);
2305 while ((verb = iter.next(pts)) != SkPath::kDone_Verb) {
2389 SkASSERT(SkPath::kMove_Verb == fCurrVerb[~0]);
2395 case SkPath::kMove_Verb:
2397 case SkPath::kLine_Verb:
2400 case SkPath::kConic_Verb:
2403 case SkPath::kQuad_Verb:
2406 case SkPath::kCubic_Verb:
2409 case SkPath::kClose_Verb:
2501 static void crossToDir(SkScalar cross, SkPath::Direction* dir) {
2502 *dir = cross > 0 ? SkPath::kCW_Direction : SkPath::kCCW_Direction;
2513 bool SkPath::cheapComputeDirection(Direction* dir) const {
2807 bool SkPath::contains(SkScalar x, SkScalar y) const {
2817 SkPath::Iter iter(*this, true);
2823 case SkPath::kMove_Verb:
2824 case SkPath::kClose_Verb:
2826 case SkPath::kLine_Verb:
2829 case SkPath::kQuad_Verb:
2832 case SkPath::kConic_Verb:
2835 case SkPath::kCubic_Verb:
2838 case SkPath::kDone_Verb:
2845 case SkPath::kEvenOdd_FillType:
2846 case SkPath::kInverseEvenOdd_FillType: