Skip to content

Commit b980c84

Browse files
SonarSonictonsky
authored andcommitted
Fixed PathSegmentIterator returning conic segments for cubics
When iterating over a Path, the resulting cubic segments are incorrectly returned as conic segments, making the path invalid.
1 parent 33d80f1 commit b980c84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

platform/cc/PathSegmentIterator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extern "C" JNIEXPORT jobject JNICALL Java_io_github_humbleui_skija_PathSegmentIt
4343
segment = env->NewObject(skija::PathSegment::cls, skija::PathSegment::ctorConic, pts[0].fX, pts[0].fY, pts[1].fX, pts[1].fY, pts[2].fX, pts[2].fY, instance->conicWeight(), instance->isClosedContour());
4444
break;
4545
case SkPath::Verb::kCubic_Verb:
46-
segment = env->NewObject(skija::PathSegment::cls, skija::PathSegment::ctorConic, pts[0].fX, pts[0].fY, pts[1].fX, pts[1].fY, pts[2].fX, pts[2].fY, pts[3].fX, pts[3].fY, instance->isClosedContour());
46+
segment = env->NewObject(skija::PathSegment::cls, skija::PathSegment::ctorCubic, pts[0].fX, pts[0].fY, pts[1].fX, pts[1].fY, pts[2].fX, pts[2].fY, pts[3].fX, pts[3].fY, instance->isClosedContour());
4747
break;
4848
}
4949
return segment;

0 commit comments

Comments
 (0)