Definition at line 170 of file SkPathOpsAsWinding.cpp.
◆ Edge
◆ OpAsWinding()
OpAsWinding::OpAsWinding |
( |
const SkPath & |
path | ) |
|
|
inline |
Definition at line 177 of file SkPathOpsAsWinding.cpp.
179 }
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
◆ checkContainerChildren()
bool OpAsWinding::checkContainerChildren |
( |
Contour * |
parent, |
|
|
Contour * |
child |
|
) |
| |
|
inline |
Definition at line 328 of file SkPathOpsAsWinding.cpp.
328 {
329 for (
auto grandChild : child->
fChildren) {
331 return false;
332 }
333 }
334 if (parent) {
336 return false;
337 }
338 }
339 return true;
340 }
bool containerContains(Contour &contour, Contour &test)
bool checkContainerChildren(Contour *parent, Contour *child)
vector< Contour * > fChildren
◆ containerContains()
bool OpAsWinding::containerContains |
( |
Contour & |
contour, |
|
|
Contour & |
test |
|
) |
| |
|
inline |
Definition at line 291 of file SkPathOpsAsWinding.cpp.
291 {
292
293
294
295
298 }
299
302
303
304 test.fContained = winding != 0;
305 return -1 <= winding && winding <= 1;
306 }
int nextEdge(Contour &contour, Edge edge)
◆ contourBounds()
void OpAsWinding::contourBounds |
( |
vector< Contour > * |
containers | ) |
|
|
inline |
Definition at line 181 of file SkPathOpsAsWinding.cpp.
181 {
184 int lastStart = 0;
185 int verbStart = 0;
189 containers->emplace_back(
bounds, lastStart, verbStart);
190 lastStart = verbStart;
191 }
193 }
197 bounds.joinPossiblyEmptyRect(verbBounds);
198 }
199 ++verbStart;
200 }
202 containers->emplace_back(
bounds, lastStart, ++verbStart);
203 }
204 }
static const int kPtIndex[]
static const int kPtCount[]
@ kCubic
SkPath::RawIter returns 4 points.
@ kMove
SkPath::RawIter returns 1 point.
@ kLine
SkPath::RawIter returns 2 points.
Optional< SkRect > bounds
void setBounds(const SkPoint pts[], int count)
◆ getDirection()
Definition at line 206 of file SkPathOpsAsWinding.cpp.
206 {
208 int verbCount = -1;
211
213 do {
214 verb = iter.next(pts);
215 if (++verbCount <
contour.fVerbStart) {
216 continue;
217 }
218 if (verbCount >=
contour.fVerbEnd) {
219 continue;
220 }
222 continue;
223 }
224
225 switch (verb)
226 {
228 total_signed_area += (pts[0].
fY - pts[1].
fY) * (pts[0].fX + pts[1].fX);
229 break;
232 total_signed_area += (pts[0].
fY - pts[2].
fY) * (pts[0].fX + pts[2].fX);
233 break;
235 total_signed_area += (pts[0].
fY - pts[3].
fY) * (pts[0].fX + pts[3].fX);
236 break;
237 default:
238 break;
239 }
241
243 }
◆ inParent()
Definition at line 308 of file SkPathOpsAsWinding.cpp.
308 {
309
313 return;
314 }
315 }
316
318 if (
contour.fBounds.contains((*iter)->fBounds)) {
319 contour.fChildren.push_back(*iter);
321 continue;
322 }
323 ++iter;
324 }
326 }
void inParent(Contour &contour, Contour &parent)
◆ markReverse()
Definition at line 342 of file SkPathOpsAsWinding.cpp.
342 {
343 bool reversed = false;
344 for (
auto grandChild : child->
fChildren) {
345 reversed |=
markReverse(grandChild->fContained ? child : parent, grandChild);
346 }
347
352 return true;
353 }
354 return reversed;
355 }
Contour::Direction getDirection(Contour &contour)
bool markReverse(Contour *parent, Contour *child)
◆ nextEdge()
Definition at line 245 of file SkPathOpsAsWinding.cpp.
245 {
249 int verbCount = -1;
250 int winding = 0;
251 do {
252 verb = iter.next(pts);
253 if (++verbCount <
contour.fVerbStart) {
254 continue;
255 }
256 if (verbCount >=
contour.fVerbEnd) {
257 continue;
258 }
260 continue;
261 }
262 bool horizontal = true;
263 for (
int index = 1; index <=
kPtCount[verb]; ++index) {
264 if (pts[0].fY != pts[index].fY) {
265 horizontal = false;
266 break;
267 }
268 }
269 if (horizontal) {
270 continue;
271 }
274 continue;
275 }
279 continue;
280 }
283 continue;
284 }
285 }
288 return winding;
289 }
static SkPoint left_edge(SkPoint pts[4], SkPath::Verb verb, SkScalar weight)
static SkScalar conic_weight(const SkPath::Iter &iter, SkPath::Verb verb)
static int contains_edge(SkPoint pts[4], SkPath::Verb verb, SkScalar weight, const SkPoint &edge)
◆ reverseMarkedContours()
Definition at line 357 of file SkPathOpsAsWinding.cpp.
357 {
359 auto iter = iterate.begin();
360 int verbCount = 0;
361
363 result.setFillType(fillType);
367 for (; iter != iterate.end() && verbCount <
contour.fVerbEnd; ++iter, ++verbCount) {
368 auto [verb, pts,
w] = *iter;
369 switch (verb) {
372 break;
375 break;
377 temp->
quadTo(pts[1], pts[2]);
378 break;
381 break;
383 temp->
cubicTo(pts[1], pts[2], pts[3]);
384 break;
387 break;
388 }
389 }
393 }
394 }
396 }
@ kClose
SkPath::RawIter returns 0 points.
@ kConic
SkPath::RawIter returns 3 points + 1 weight.
@ kQuad
SkPath::RawIter returns 3 points.
SkPathBuilder & conicTo(SkPoint pt1, SkPoint pt2, SkScalar w)
SkPathBuilder & lineTo(SkPoint pt)
SkPathBuilder & cubicTo(SkPoint pt1, SkPoint pt2, SkPoint pt3)
SkPathBuilder & moveTo(SkPoint pt)
SkPathBuilder & quadTo(SkPoint pt1, SkPoint pt2)
static void ReverseAddPath(SkPathBuilder *builder, const SkPath &reverseMe)
The documentation for this class was generated from the following file: