Lines Matching defs:const
56 static void joinNoEmptyChecks(SkRect* dst, const SkRect& src) {
63 static bool is_degenerate(const SkPath& path) {
96 SkAutoPathBoundsUpdate(SkPath* path, const SkRect& r) : fPath(path), fRect(r) {
173 SkPath::SkPath(const SkPath& that)
183 SkPath& SkPath::operator=(const SkPath& that) {
194 void SkPath::copyFields(const SkPath& that) {
205 bool operator==(const SkPath& a, const SkPath& b) {
217 const auto ft = fFillType;
221 const auto iv = fIsVolatile;
236 bool SkPath::isInterpolatable(const SkPath& compare) const {
243 bool SkPath::interpolate(const SkPath& ending, SkScalar weight, SkPath* out) const {
257 static inline bool check_edge_against_rect(const SkPoint& p0,
258 const SkPoint& p1,
259 const SkRect& rect,
261 const SkPoint* edgeBegin;
283 bool SkPath::conservativelyContainsRect(const SkRect& rect) const {
350 uint32_t SkPath::getGenerationID() const {
375 bool SkPath::isLastContourClosed() const {
383 bool SkPath::isLine(SkPoint line[2]) const {
391 const SkPoint* pts = fPathRef->points();
451 bool SkPath::isRect(SkRect* rect, bool* isClosed, SkPathDirection* direction) const {
454 const SkPoint* pts = fPathRef->points();
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 {
511 bool SkPath::getLastPt(SkPoint* lastPt) const {
551 // This is the public-facing non-const setConvexity().
556 // Const hooks for working with fConvexity and fFirstDirection from const methods.
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 {
649 const SkPoint& pt = fPathRef->atPoint(~fLastMoveToIndex);
793 SkPath& SkPath::addRect(const SkRect &rect, SkPathDirection dir, unsigned startIndex) {
802 const int kVerbs = 5; // moveTo + 3x lineTo + close
817 SkPath& SkPath::addPoly(const SkPoint pts[], int count, bool close) {
846 static bool arc_is_lone_point(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
907 static int build_arc_conics(const SkRect& oval, const SkVector& start, const SkVector& stop,
922 SkPath& SkPath::addRoundRect(const SkRect& rect, const SkScalar radii[],
925 rrect.setRectRadii(rect, (const SkVector*) radii);
929 SkPath& SkPath::addRRect(const SkRRect& rrect, SkPathDirection dir) {
934 SkPath& SkPath::addRRect(const SkRRect &rrect, SkPathDirection dir, unsigned startIndex) {
938 const SkRect& bounds = rrect.getBounds();
954 const bool startsWithConic = ((startIndex & 1) == (dir == SkPathDirection::kCW));
955 const SkScalar weight = SK_ScalarRoot2Over2;
958 const int kVerbs = startsWithConic
966 const unsigned rectStartIndex = startIndex / 2 + (dir == SkPathDirection::kCW ? 0 : 1);
995 bool SkPath::hasOnlyMoveTos() const {
997 const uint8_t* verbs = fPathRef->verbsBegin();
1010 bool SkPath::isZeroLengthSincePoint(int startPtIndex) const {
1015 const SkPoint* pts = fPathRef->points() + startPtIndex;
1016 const SkPoint& first = *pts;
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) {
1063 const int kVerbs = 6; // moveTo + 4x conicTo + close
1069 const SkScalar weight = SK_ScalarRoot2Over2;
1092 SkPath& SkPath::arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
1116 auto addPt = [&forceMoveTo, this](const SkPoint& pt) {
1147 const SkPoint& pt = conics[0].fPts[0];
1303 SkPath& SkPath::addArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle) {
1308 const SkScalar kFullCircleAngle = SkIntToScalar(360);
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;
1449 SkPath& SkPath::reversePathTo(const SkPath& path) {
1454 const uint8_t* verbs = path.fPathRef->verbsEnd();
1455 const uint8_t* verbsBegin = path.fPathRef->verbsBegin();
1457 const SkPoint* pts = path.fPathRef->pointsEnd() - 1;
1458 const SkScalar* conicWeights = path.fPathRef->conicWeightsEnd();
1489 SkPath& SkPath::reverseAddPath(const SkPath& srcPath) {
1491 const SkPath* src = &srcPath;
1497 const uint8_t* verbsBegin = src->fPathRef->verbsBegin();
1498 const uint8_t* verbs = src->fPathRef->verbsEnd();
1499 const SkPoint* pts = src->fPathRef->pointsEnd();
1500 const SkScalar* conicWeights = src->fPathRef->conicWeightsEnd();
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 {
1585 const SkPath* src = this;
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 {
1715 const uint8_t* verbs = fVerbs;
1716 const uint8_t* stop = fVerbStop;
1773 const SkPoint* SK_RESTRICT srcPts = fPts;
1831 void SkPath::RawIter::setPath(const SkPath& path) {
1865 static void append_params(SkString* str, const char label[], const SkPoint pts[],
1870 const SkScalar* values = &pts[0].fX;
1900 void SkPath::dump(SkWStream* wStream, bool dumpAsHex) const {
1907 char const * const gFillTypeStrs[] = {
1950 void SkPath::dump(std::string& desc, int depth) const {
1958 char const * const gFillTypeStrs[] = {
1996 void SkPath::dumpArrays(SkWStream* wStream, bool dumpAsHex) const {
2015 builder.append("const SkPoint path_points[] = {\n");
2026 const char* gVerbStrs[] = {
2029 builder.append("const uint8_t path_verbs[] = {\n ");
2035 const int nConics = fPathRef->conicWeightsEnd() - fPathRef->conicWeights();
2037 builder.append("const SkScalar path_conics[] = {\n ");
2045 char const * const gFillTypeStrs[] = {
2066 bool SkPath::isValidImpl() const {
2124 SkPathFirstDirection getFirstDirection() const { return fFirstDirection; }
2126 void setMovePt(const SkPoint& pt) {
2131 bool addPt(const SkPoint& pt) {
2146 static SkPathConvexity BySign(const SkPoint points[], int count) {
2152 const SkPoint* last = points + count;
2194 bool isFinite() const {
2198 int reversals() const {
2203 DirChange directionChange(const SkVector& curVec) {
2214 bool addVec(const SkVector& curVec) {
2259 SkPathConvexity SkPath::computeConvexity() const {
2293 const SkPoint* points = fPathRef->points();
2367 ContourIter(const SkPathRef& pathRef);
2369 bool done() const { return fDone; }
2371 int count() const { return fCurrPtCount; }
2372 const SkPoint* pts() const { return fCurrPt; }
2377 const SkPoint* fCurrPt;
2378 const uint8_t* fCurrVerb;
2379 const uint8_t* fStopVerbs;
2380 const SkScalar* fCurrConicWeight;
2385 ContourIter::ContourIter(const SkPathRef& pathRef) {
2409 const uint8_t* verbs = fCurrVerb;
2441 static SkScalar cross_prod(const SkPoint& p0, const SkPoint& p1, const SkPoint& p2) {
2463 static int find_max_y(const SkPoint pts[], int count) {
2477 static int find_diff_pt(const SkPoint pts[], int index, int n, int inc) {
2495 static int find_min_max_x_at_y(const SkPoint pts[], int index, int n,
2497 const SkScalar y = pts[index].fY;
2531 SkPathFirstDirection SkPathPriv::ComputeFirstDirection(const SkPath& path) {
2556 const SkPoint* pts = iter.pts();
2635 template <size_t N> static void find_minmax(const SkPoint pts[],
2647 static bool checkOnCurve(SkScalar x, SkScalar y, const SkPoint& start, const SkPoint& end) {
2655 static int winding_mono_cubic(const SkPoint pts[], SkScalar x, SkScalar y, int* onCurveCount) {
2701 static int winding_cubic(const SkPoint pts[], SkScalar x, SkScalar y, int* onCurveCount) {
2711 static double conic_eval_numerator(const SkScalar src[], SkScalar w, SkScalar t) {
2729 static int winding_mono_conic(const SkConic& conic, SkScalar x, SkScalar y, int* onCurveCount) {
2730 const SkPoint* pts = conic.fPts;
2791 static int winding_conic(const SkPoint pts[], SkScalar x, SkScalar y, SkScalar weight,
2805 static int winding_mono_quad(const SkPoint pts[], SkScalar x, SkScalar y, int* onCurveCount) {
2860 static int winding_quad(const SkPoint pts[], SkScalar x, SkScalar y, int* onCurveCount) {
2875 static int winding_line(const SkPoint pts[], SkScalar x, SkScalar y, int* onCurveCount) {
2915 static void tangent_cubic(const SkPoint pts[], SkScalar x, SkScalar y,
2943 static void tangent_conic(const SkPoint pts[], SkScalar x, SkScalar y, SkScalar w,
2970 static void tangent_quad(const SkPoint pts[], SkScalar x, SkScalar y,
2996 static void tangent_line(const SkPoint pts[], SkScalar x, SkScalar y,
3018 static bool contains_inclusive(const SkRect& r, SkScalar x, SkScalar y) {
3022 bool SkPath::contains(SkScalar x, SkScalar y) const {
3103 const SkVector& tangent = tangents[last];
3108 const SkVector& test = tangents[index];
3123 int SkPath::ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const SkPoint& p2,
3125 const SkConic conic(p0, p1, p2, w);
3129 bool SkPathPriv::IsSimpleRect(const SkPath& path, bool isSimpleFill, SkRect* rect,
3239 void SkPathPriv::CreateDrawArcPath(SkPath* path, const SkRect& oval, SkScalar startAngle,
3291 static int compute_quad_extremas(const SkPoint src[3], SkPoint extremas[3]) {
3303 static int compute_conic_extremas(const SkPoint src[3], SkScalar w, SkPoint extremas[3]) {
3316 static int compute_cubic_extremas(const SkPoint src[4], SkPoint extremas[5]) {
3328 SkRect SkPath::computeTightBounds() const {
3377 bool SkPath::IsLineDegenerate(const SkPoint& p1, const SkPoint& p2, bool exact) {
3381 bool SkPath::IsQuadDegenerate(const SkPoint& p1, const SkPoint& p2,
3382 const SkPoint& p3, bool exact) {
3387 bool SkPath::IsCubicDegenerate(const SkPoint& p1, const SkPoint& p2,
3388 const SkPoint& p3, const SkPoint& p4, bool exact) {
3397 SkPathVerbAnalysis sk_path_analyze_verbs(const uint8_t vbs[], int verbCount) {
3442 SkPath SkPath::Make(const SkPoint pts[], int pointCount,
3443 const uint8_t vbs[], int verbCount,
3444 const SkScalar ws[], int wCount,
3450 const auto info = sk_path_analyze_verbs(vbs, verbCount);
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) {
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,
3502 const SkPoint** ptsPtr, bool* isClosed, SkPathDirection* direction,
3507 const SkPoint* firstPt = nullptr; // first point in the rect (last of first moves)
3508 const SkPoint* lastPt = nullptr; // last point in the rect (last of lines or first if closed)
3511 const SkPoint* pts = *ptsPtr;
3512 const SkPoint* savePts = nullptr; // used to allow caller to iterate through a pair of rects
3642 bool SkPathPriv::IsNestedFillRects(const SkPath& path, SkRect rects[2], SkPathDirection dirs[2]) {
3645 const SkPoint* pts = path.fPathRef->points();
3685 SkScalar eval(SkScalar x, SkScalar y) const {
3688 SkScalar operator()(SkScalar x, SkScalar y) const { return this->eval(x, y); }
3723 Result test(const SkRect& bounds) const {
3756 static SkPath clip(const SkPath& path, const SkHalfPlane& plane) {
3826 bool SkPathPriv::PerspectiveClip(const SkPath& path, const SkMatrix& matrix, SkPath* clippedPath) {
3852 int SkPathPriv::GenIDChangeListenersCount(const SkPath& path) {
3856 bool SkPathPriv::IsAxisAligned(const SkPath& path) {
3861 const SkPoint* pts = path.fPathRef->points();
3862 const int count = path.fPathRef->countPoints();