[OpenJDK Rasterizer] Task 2 - line widening

Jim Graham Jim.A.Graham at Sun.COM
Fri May 18 16:00:49 PDT 2007


Yes, that's definitely an area where I would probably be considered 
tainted if I created code that widened curves - hopefully someone on the 
ClassPath team might consider this a challenge to come up with a novel 
way to do it?  ;-)

			...jim

Francis Kung wrote:
>>> I remember reading at some point that it is mathematically impossible 
>>> to derive a bezier curve parallel to another bezier curve
>>
>> That is likely true, but it is also mathematically impossible to 
>> derive a set of straight lines that are exactly parallel to a bezier 
>> curve as well, so both techniques are producing approximations.
> ...
>> The advantage of curves in the widened path is that there are fewer 
>> segments to pass on to the final renderer.  If anyone were to call 
>> BS.createStrokedShape and then stroke the widened outline, it is also 
>> prettier, but the performance advantage in reducing the number of 
>> segments for rendering when it is invoked internally as part of a 
>> rendering operation is probably the more important benefit...
> 
> Agreed - of the two approximation techniques, an approximated curve is 
> better than flattening.  I'm guessing that the encumbered code you've 
> seen mostly deals with finding a good way to create such a curve... and 
> unfortunately Classpath went the route of flattening in this area.
> 
> Francis



More information about the graphics-rasterizer-dev mailing list