DescriptionConstruct round rects with perpendicular tangents.
The round rects are constructed as before out of quadratics,
but without fudging the control points. Instead, the mid on-
curve point is nudged slightly outward to prevent the
convexity test from failing.
The convexity test now includes an error term for sign
inequality after computing the cross product of the control
lines. When the control points are represented as vectors,
the number of bits of precision may be greatly reduced.
Account for this by passing the number of bits available
from the original control point values into the equality
check.
Making round rect construction lines perpendicular improves
the chances of success when path ops encounters clips.
No new tests are needed -- this change is exercised by the
convex Path unit tests and the gm tests arcofzorro and
hairlines.
Committed: http://code.google.com/p/skia/source/detail?r=12085
Patch Set 1 #Patch Set 2 : use std skia types #
Total comments: 2
Patch Set 3 : comment magic numbers #Patch Set 4 : fix release warning #
Total comments: 2
Patch Set 5 : fix epsilon for rr x y dir #Patch Set 6 : remove test define #Patch Set 7 : add suppression for gm tests #Patch Set 8 : fix conflict #
Total comments: 1
Messages
Total messages: 13 (0 generated)
|