Definition at line 26 of file mandoline.cpp.
◆ MandolineSlicer()
skiagm::MandolineSlicer::MandolineSlicer |
( |
SkPoint |
anchorPt | ) |
|
|
inline |
Definition at line 30 of file mandoline.cpp.
30 {
33 this->
reset(anchorPt);
34 }
void setFillType(SkPathFillType ft)
SkPath & setIsVolatile(bool isVolatile)
void reset(SkPoint anchorPt)
◆ path()
const SkPath & skiagm::MandolineSlicer::path |
( |
| ) |
const |
|
inline |
◆ reset()
void skiagm::MandolineSlicer::reset |
( |
SkPoint |
anchorPt | ) |
|
|
inline |
Definition at line 36 of file mandoline.cpp.
36 {
38 fLastPt = fAnchorPt = anchorPt;
39 }
◆ sliceConic()
Definition at line 98 of file mandoline.cpp.
98 {
99 if (numSubdivisions <= 0) {
104 fLastPt = p2;
105 return;
106 }
107 float T = this->chooseChopT(numSubdivisions);
109 return;
110 }
112 if (!
conic.chopAt(
T, halves)) {
114 }
115 this->
sliceConic(halves[0].
fPts[1], halves[0].
fPts[2], halves[0].fW, numSubdivisions - 1);
116 this->
sliceConic(halves[1].
fPts[1], halves[1].
fPts[2], halves[1].fW, numSubdivisions - 1);
117 }
#define SK_ABORT(message,...)
SkPath & moveTo(SkScalar x, SkScalar y)
SkPath & lineTo(SkScalar x, SkScalar y)
SkPath & conicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar w)
void sliceConic(SkPoint p1, SkPoint p2, float w, int numSubdivisions=kDefaultSubdivisions)
◆ sliceCubic()
Definition at line 78 of file mandoline.cpp.
79 {
80 if (numSubdivisions <= 0) {
85 fLastPt = p3;
86 return;
87 }
88 float T = this->chooseChopT(numSubdivisions);
90 return;
91 }
96 }
void SkChopCubicAt(const SkPoint src[4], SkPoint dst[7], SkScalar t)
SkPath & cubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar x3, SkScalar y3)
void sliceCubic(SkPoint p1, SkPoint p2, SkPoint p3, int numSubdivisions=kDefaultSubdivisions)
◆ sliceLine()
Definition at line 41 of file mandoline.cpp.
41 {
42 if (numSubdivisions <= 0) {
47 fLastPt = pt;
48 return;
49 }
50 float T = this->chooseChopT(numSubdivisions);
52 return;
53 }
54 SkPoint midpt = fLastPt * (1 -
T) + pt *
T;
55 this->
sliceLine(midpt, numSubdivisions - 1);
57 }
void sliceLine(SkPoint pt, int numSubdivisions=kDefaultSubdivisions)
◆ sliceQuadratic()
Definition at line 59 of file mandoline.cpp.
59 {
60 if (numSubdivisions <= 0) {
65 fLastPt = p2;
66 return;
67 }
68 float T = this->chooseChopT(numSubdivisions);
70 return;
71 }
76 }
void SkChopQuadAt(const SkPoint src[3], SkPoint dst[5], SkScalar t)
SkPath & quadTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2)
void sliceQuadratic(SkPoint p1, SkPoint p2, int numSubdivisions=kDefaultSubdivisions)
◆ kDefaultSubdivisions
constexpr int skiagm::MandolineSlicer::kDefaultSubdivisions = 10 |
|
inlinestaticconstexpr |
The documentation for this class was generated from the following file: