diff options
Diffstat (limited to 'src/effects/SkCornerPathEffect.cpp')
-rw-r--r-- | src/effects/SkCornerPathEffect.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/effects/SkCornerPathEffect.cpp b/src/effects/SkCornerPathEffect.cpp index 8dc506ace4..31f55a3901 100644 --- a/src/effects/SkCornerPathEffect.cpp +++ b/src/effects/SkCornerPathEffect.cpp @@ -94,6 +94,16 @@ bool SkCornerPathEffect::filterPath(SkPath* dst, const SkPath& src, lastCorner = pts[2]; firstStep.set(0, 0); break; + case SkPath::kConic_Verb: + // TBD - just replicate the curve for now + if (!prevIsValid) { + dst->moveTo(pts[0]); + prevIsValid = true; + } + dst->conicTo(pts[1], pts[2], iter.conicWeight()); + lastCorner = pts[2]; + firstStep.set(0, 0); + break; case SkPath::kCubic_Verb: if (!prevIsValid) { dst->moveTo(pts[0]); @@ -111,11 +121,12 @@ bool SkCornerPathEffect::filterPath(SkPath* dst, const SkPath& src, lastCorner.fY + firstStep.fY); } dst->close(); - break; - case SkPath::kConic_Verb: - SkASSERT(0); + prevIsValid = false; break; case SkPath::kDone_Verb: + if (prevIsValid) { + dst->lineTo(lastCorner); + } goto DONE; } |