fallback to drawing a line if the cubic is still too curvy, even if we've
exhausted our recursive attempts to subdivide. Fixes trying to stroke this cubic (width==1.0) path.moveTo(460.2881309415525, 303.250847066498); path.cubicTo(463.36378422175284, 302.1169735073363, 456.32239330810046, 304.720354932878, 453.15255460013304, 305.788586869862); git-svn-id: http://skia.googlecode.com/svn/trunk@219 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
ad687ceae2
commit
0ea42c1d2c
@ -302,9 +302,13 @@ DRAW_LINE:
|
||||
bool degenerateBC = !set_normal_unitnormal(pts[1], pts[2], fRadius,
|
||||
&normalBC, &unitNormalBC);
|
||||
|
||||
if (--subDivide >= 0 &&
|
||||
(degenerateBC || normals_too_curvy(unitNormalAB, unitNormalBC) ||
|
||||
normals_too_curvy(unitNormalBC, *unitNormalCD))) {
|
||||
|
||||
if (degenerateBC || normals_too_curvy(unitNormalAB, unitNormalBC) ||
|
||||
normals_too_curvy(unitNormalBC, *unitNormalCD)) {
|
||||
// subdivide if we can
|
||||
if (--subDivide < 0) {
|
||||
goto DRAW_LINE;
|
||||
}
|
||||
SkPoint tmp[7];
|
||||
SkVector norm, unit, dummy, unitDummy;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user