Lines Matching refs:SkPoint
65 static SkPath Make(const SkPoint[], int pointCount,
81 static SkPath Polygon(const SkPoint pts[], int count, bool isClosed,
85 static SkPath Polygon(const std::initializer_list<SkPoint>& list, bool isClosed,
91 static SkPath Line(const SkPoint a, const SkPoint b) {
95 /** Constructs an empty SkPath. By default, SkPath has no verbs, no SkPoint, and no weights.
106 the returned result share pointer values. The underlying verb array, SkPoint array
128 shares pointer values. The underlying verb array, SkPoint array and weights
135 @param path verb array, SkPoint array, weights, and SkPath::FillType to copy
142 /** Compares a and b; returns true if SkPath::FillType, verb array, SkPoint array, and weights
151 /** Compares a and b; returns true if SkPath::FillType, verb array, SkPoint array, and weights
176 /** Interpolates between SkPath with SkPoint array of equal size.
177 Copy verb array and weights to out, and set out SkPoint array to a weighted
178 average of this SkPoint array and ending SkPoint array, using the formula:
181 weight is most useful when between zero (ending SkPoint array) and
185 interpolate() returns false and leaves out unchanged if SkPoint array is not
186 the same size as ending SkPoint array. Call isInterpolatable() to check SkPath
189 @param ending SkPoint array averaged with this SkPoint array
190 @param weight contribution of this SkPoint array, and
191 one minus contribution of ending SkPoint array
193 @return true if SkPath contain same number of SkPoint
260 Removes verb array, SkPoint array, and weights, and sets FillType to kWinding.
270 Removes verb array, SkPoint array, and weights, and sets FillType to kWinding.
283 Empty SkPath may have FillType but has no SkPoint, SkPath::Verb, or conic weight.
295 closed contour draws SkPaint::Join instead of SkPaint::Cap at first and last SkPoint.
303 /** Returns true for finite SkPoint array values between negative SK_ScalarMax and
304 positive SK_ScalarMax. Returns false for any SkPoint array value of
307 @return true if all SkPoint values are finite
346 /** Tests if line between SkPoint pair is degenerate.
360 static bool IsLineDegenerate(const SkPoint& p1, const SkPoint& p2, bool exact);
373 static bool IsQuadDegenerate(const SkPoint& p1, const SkPoint& p2,
374 const SkPoint& p3, bool exact);
388 static bool IsCubicDegenerate(const SkPoint& p1, const SkPoint& p2,
389 const SkPoint& p3, const SkPoint& p4, bool exact);
402 bool isLine(SkPoint line[2]) const;
405 SkPoint count is initially zero.
407 @return SkPath SkPoint array length
413 /** Returns SkPoint at index in SkPoint array. Valid range for index is
417 @param index SkPoint array element selector
418 @return SkPoint array value or (0, 0)
422 SkPoint getPoint(int index) const;
428 @param points storage for SkPath SkPoint array. May be nullptr
430 @return SkPath SkPoint array length
434 int getPoints(SkPoint points[], int max) const;
462 /** Exchanges the verb array, SkPoint array, weights, and SkPath::FillType with other.
476 /** Returns minimum and maximum axes values of SkPoint array.
480 SkRect returned includes all SkPoint added to SkPath, including SkPoint associated with
483 @return bounds of all SkPoint in SkPoint array
507 Includes SkPoint associated with kMove_Verb that define empty
527 the SkPoint or line described by rect is contained by SkPath.
529 @param rect SkRect, line, or SkPoint checked for containment
536 /** Grows SkPath verb array and SkPoint array to contain extraPtCount additional SkPoint.
540 @param extraPtCount number of additional SkPoint to allocate
550 /** Adds beginning of contour at SkPoint (x, y).
560 /** Adds beginning of contour at SkPoint p.
565 SkPath& moveTo(const SkPoint& p) {
585 lineTo() appends kMove_Verb to verb array and (0, 0) to SkPoint array, if needed.
586 lineTo() then appends kLine_Verb to verb array and (x, y) to SkPoint array.
596 /** Adds line from last point to SkPoint p. If SkPath is empty, or last SkPath::Verb is
599 lineTo() first appends kMove_Verb to verb array and (0, 0) to SkPoint array, if needed.
600 lineTo() then appends kLine_Verb to verb array and SkPoint p to SkPoint array.
602 @param p end SkPoint of added line
605 SkPath& lineTo(const SkPoint& p) {
612 Appends kMove_Verb to verb array and (0, 0) to SkPoint array, if needed;
613 then appends kLine_Verb to verb array and line end to SkPoint array.
631 Appends kMove_Verb to verb array and (0, 0) to SkPoint array, if needed;
633 to SkPoint array.
635 @param x1 control SkPoint of quad on x-axis
636 @param y1 control SkPoint of quad on y-axis
637 @param x2 end SkPoint of quad on x-axis
638 @param y2 end SkPoint of quad on y-axis
645 /** Adds quad from last point towards SkPoint p1, to SkPoint p2.
649 Appends kMove_Verb to verb array and (0, 0) to SkPoint array, if needed;
650 then appends kQuad_Verb to verb array; and SkPoint p1, p2
651 to SkPoint array.
653 @param p1 control SkPoint of added quad
654 @param p2 end SkPoint of added quad
657 SkPath& quadTo(const SkPoint& p1, const SkPoint& p2) {
665 Appends kMove_Verb to verb array and (0, 0) to SkPoint array,
667 control and quad end to SkPoint array.
689 Appends kMove_Verb to verb array and (0, 0) to SkPoint array, if needed.
692 and (x1, y1), (x2, y2) to SkPoint array; and w to conic weights.
695 (x1, y1), (x2, y2) to SkPoint array.
698 (x1, y1), (x2, y2) to SkPoint array.
700 @param x1 control SkPoint of conic on x-axis
701 @param y1 control SkPoint of conic on y-axis
702 @param x2 end SkPoint of conic on x-axis
703 @param y2 end SkPoint of conic on y-axis
710 /** Adds conic from last point towards SkPoint p1, to SkPoint p2, weighted by w.
714 Appends kMove_Verb to verb array and (0, 0) to SkPoint array, if needed.
717 and SkPoint p1, p2 to SkPoint array; and w to conic weights.
719 If w is one, appends kQuad_Verb to verb array, and SkPoint p1, p2
720 to SkPoint array.
723 SkPoint p1, p2 to SkPoint array.
725 @param p1 control SkPoint of added conic
726 @param p2 end SkPoint of added conic
730 SkPath& conicTo(const SkPoint& p1, const SkPoint& p2, SkScalar w) {
738 Appends kMove_Verb to verb array and (0, 0) to SkPoint array,
746 In all cases appends SkPoint control and end to SkPoint array.
766 Appends kMove_Verb to verb array and (0, 0) to SkPoint array, if needed;
768 to SkPoint array.
770 @param x1 first control SkPoint of cubic on x-axis
771 @param y1 first control SkPoint of cubic on y-axis
772 @param x2 second control SkPoint of cubic on x-axis
773 @param y2 second control SkPoint of cubic on y-axis
774 @param x3 end SkPoint of cubic on x-axis
775 @param y3 end SkPoint of cubic on y-axis
781 /** Adds cubic from last point towards SkPoint p1, then towards SkPoint p2, ending at
782 SkPoint p3. If SkPath is empty, or last SkPath::Verb is kClose_Verb, last point is set to
785 Appends kMove_Verb to verb array and (0, 0) to SkPoint array, if needed;
786 then appends kCubic_Verb to verb array; and SkPoint p1, p2, p3
787 to SkPoint array.
789 @param p1 first control SkPoint of cubic
790 @param p2 second control SkPoint of cubic
791 @param p3 end SkPoint of cubic
794 SkPath& cubicTo(const SkPoint& p1, const SkPoint& p2, const SkPoint& p3) {
803 Appends kMove_Verb to verb array and (0, 0) to SkPoint array,
805 control and cubic end to SkPoint array.
826 arcTo() adds line connecting SkPath last SkPoint to initial arc SkPoint if forceMoveTo
872 If last SkPath SkPoint does not start arc, arcTo() appends connecting line to SkPath.
876 tangents are nearly parallel, arcTo() appends line from last SkPath SkPoint to p1.
881 @param p1 SkPoint common to pair of tangents
886 SkPath& arcTo(const SkPoint p1, const SkPoint p2, SkScalar radius) {
891 Four oval parts with radii (rx, ry) start at last SkPath SkPoint and ends at (x, y).
901 curves from last SkPath SkPoint to (x, y), choosing one of four possible routes:
905 either radii are zero, or if last SkPath SkPoint equals (x, y). arcTo() scales radii
906 (rx, ry) to fit last SkPath SkPoint and (x, y) if both are greater than zero but
928 from last SkPath SkPoint to (xy.fX, xy.fY), choosing one of four possible routes:
933 radii are zero, or if last SkPath SkPoint equals (xy.fX, xy.fY). arcTo() scales radii r to
934 fit last SkPath SkPoint and xy if both are greater than zero but too small to describe
949 SkPath& arcTo(const SkPoint r, SkScalar xAxisRotate, ArcSize largeArc, SkPathDirection sweep,
950 const SkPoint xy) {
954 /** Appends arc to SkPath, relative to last SkPath SkPoint. Arc is implemented by one or
956 xAxisRotate degrees. Arc curves from last SkPath SkPoint to relative end SkPoint:
958 counterclockwise, and smaller or larger. If SkPath is empty, the start arc SkPoint
961 Arc sweep is always less than 360 degrees. arcTo() appends line to end SkPoint
962 if either radii are zero, or if last SkPath SkPoint equals end SkPoint.
963 arcTo() scales radii (rx, ry) to fit last SkPath SkPoint and end SkPoint if both are
976 @param dx x-axis offset end of arc from last SkPath SkPoint
977 @param dy y-axis offset end of arc from last SkPath SkPoint
983 /** Appends kClose_Verb to SkPath. A closed contour connects the first and last SkPoint
1001 /** Approximates conic with quad array. Conic is constructed from start SkPoint p0,
1002 control SkPoint p1, end SkPoint p2, and weight w.
1005 Every third point in array shares last SkPoint of previous quad and first SkPoint of
1007 (1 + 2 * (1 << pow2)) * sizeof(SkPoint).
1019 @param p0 conic start SkPoint
1020 @param p1 conic control SkPoint
1021 @param p2 conic end SkPoint
1027 static int ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const SkPoint& p2,
1028 SkScalar w, SkPoint pts[], int pow2);
1208 Contour added starts at pts[0], then adds a line for every additional SkPoint
1215 @param pts array of line sharing end and start SkPoint
1216 @param count length of SkPoint array
1222 SkPath& addPoly(const SkPoint pts[], int count, bool close);
1225 for every additional SkPoint in list. If close is true, appends kClose_Verb to SkPath,
1226 connecting last and first SkPoint in list.
1230 @param list array of SkPoint
1234 SkPath& addPoly(const std::initializer_list<SkPoint>& list, bool close) {
1253 If mode is kAppend_AddPathMode, src verb array, SkPoint array, and conic weights are
1255 verbs, SkPoint, and conic weights.
1257 @param src SkPath verbs, SkPoint, and conic weights to add
1258 @param dx offset added to src SkPoint array x-axis coordinates
1259 @param dy offset added to src SkPoint array y-axis coordinates
1268 If mode is kAppend_AddPathMode, src verb array, SkPoint array, and conic weights are
1270 verbs, SkPoint, and conic weights.
1272 @param src SkPath verbs, SkPoint, and conic weights to add
1283 verbs, SkPoint, and conic weights.
1285 If mode is kAppend_AddPathMode, src verb array, SkPoint array, and conic weights are
1287 verbs, SkPoint, and conic weights.
1289 @param src SkPath verbs, SkPoint, and conic weights to add
1300 @param src SkPath verbs, SkPoint, and conic weights to add
1307 /** Offsets SkPoint array by (dx, dy). Offset SkPath replaces dst.
1310 @param dx offset added to SkPoint array x-axis coordinates
1311 @param dy offset added to SkPoint array y-axis coordinates
1318 /** Offsets SkPoint array by (dx, dy). SkPath is replaced by offset data.
1320 @param dx offset added to SkPoint array x-axis coordinates
1321 @param dy offset added to SkPoint array y-axis coordinates
1327 /** Transforms verb array, SkPoint array, and weight by matrix.
1341 /** Transforms verb array, SkPoint array, and weight by matrix.
1364 /** Returns last point on SkPath in lastPt. Returns false if SkPoint array is empty,
1367 @param lastPt storage for final SkPoint in SkPoint array; may be nullptr
1368 @return true if SkPoint array contains one or more SkPoint
1372 bool getLastPt(SkPoint* lastPt) const;
1374 /** Sets last point to (x, y). If SkPoint array is empty, append kMove_Verb to
1375 verb array and append (x, y) to SkPoint array.
1384 /** Sets the last point on the path. If SkPoint array is empty, append kMove_Verb to
1385 verb array and append p to SkPoint array.
1389 void setLastPt(const SkPoint& p) {
1415 Verb instructs SkPath how to interpret one or more SkPoint and optional conic weight;
1429 Iterates through verb array, and associated SkPoint array and conic weight.
1446 /** Sets SkPath::Iter to return elements of verb array, SkPoint array, and conic weight in
1458 /** Sets SkPath::Iter to return elements of verb array, SkPoint array, and conic weight in
1472 Zero to four SkPoint are stored in pts, depending on the returned SkPath::Verb.
1474 @param pts storage for SkPoint data describing returned SkPath::Verb
1479 Verb next(SkPoint pts[4]);
1486 @return conic weight for conic SkPoint returned by next()
1512 const SkPoint* fPts;
1516 SkPoint fMoveTo;
1517 SkPoint fLastPt;
1522 Verb autoClose(SkPoint pts[2]);
1535 RangeIter(const uint8_t* verbs, const SkPoint* points, const SkScalar* weights)
1561 std::tuple<SkPathVerb, const SkPoint*, const SkScalar*> operator*() const {
1594 const SkPoint* fPoints = nullptr;
1596 SkDEBUGCODE(const SkPoint* fInitialPoints = nullptr;)
1613 /** Sets RawIter to return elements of verb array, SkPoint array, and conic weight in path.
1622 /** Sets SkPath::Iter to return elements of verb array, SkPoint array, and conic weight in
1631 Zero to four SkPoint are stored in pts, depending on the returned SkPath::Verb.
1633 @param pts storage for SkPoint data describing returned SkPath::Verb
1636 Verb next(SkPoint[4]);
1651 @return conic weight for conic SkPoint returned by next()
1670 @return true if SkPoint is in SkPath
1678 of floating point numbers used in SkPoint array and conic weights.
1704 Writes SkPath::FillType, verb array, SkPoint array, conic weight, and
1719 serialize() writes SkPath::FillType, verb array, SkPoint array, conic weight, and
1734 Reads SkPath::FillType, verb array, SkPoint array, conic weight, and
1750 if verb array, SkPoint array, or conic weight changes.
1877 /** Shrinks SkPath verb array and SkPoint array storage to discard unused capacity.