the following code doesnt effectively go through verbs to points
i've tried: 0, 1, 3, 0 ... 1, 2, 4, 1
------------
SkPath *u_path = some_path;
SkSTArray<16, uint8_t, true> verbs;
SkSTArray<16, SkPoint, true> points;
int n_verbs = u_path->countVerbs();
int n_points = u_path->countPoints();
verbs.resize_back (n_verbs);
points.resize_back(n_points);
u_path->getPoints (&points[0], n_points);
u_path->getVerbs ( &verbs[0], n_verbs);
int ip = 0;
for (int i = 0; i < n_verbs; i++) {
switch (verbs[i]) {
case SkPath::kMove_Verb: // 1
ip += 1;
break;
case SkPath::kLine_Verb: // 2
ip += 2;
break;
case SkPath::kCubic_Verb: // 4
ip += 4;
break;
case SkPath::kClose_Verb: // 1
ip += 1;
break;
default:
assert(false);
break;
}
}
assert(n_points == ip);
I've tried every possible count for verb that could be. the amount of points available absolutely does not line up with the verbs. i only have move, line, and bezier segments in this path. there is no conic or quad. it asserts false for anything else, the only failure i get is on the check at the end.
i need to go through and splice out a set of ops after it moves between sub paths. A simple lamba to iterate through sections of SkPath would be very useful, and SkPathMeasure reports thousands of segments (it must be after post-GPU). I just need to perform a path operation and remove a couple paths.
Thanks
Kalen
--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/c765ae45-5889-4f13-ad76-1080dbc916a1n%40googlegroups.com.
| Brian Salomon | | Office Hours: go/bsalomon-office | | bsal...@google.com |
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/CAHOuerkPDpdC%3D3%2BH01xTa63n3%3DQo1ZRFAXPirz9z5PXsJWqC2g%40mail.gmail.com.