[Xr] Xr API comments

Bill Spitzak spitzak at d2.com
Tue May 27 15:19:01 PDT 2003


On Tuesday 27 May 2003 12:03 pm, Carl Worth wrote:
> On May 27, Bill Spitzak wrote:
>  > I think some people would like to see arcs treated directly by
>  > converting them into straight lines, rather than going to an
>  > intermediate step of turning them into Bezier and then into straight
>  > lines.
>
> For what reason?
>
> If there were a formal Xr specification, it would guarantee that the
> effect of drawing with an arc would deviate at most "tolerance" device
> pixels from the geometrically correct result. Whether arcs were
> handled via intermediate line segments or splines would be an
> implementation detail that the user should not care about.
>
> Or am I missing something?

I don't think conic sections or 3-point splines can be mathematically 
accurately represented by 4-point Bezier splines. Therefore they would be 
drawn with two levels of approximation, first an approximation to a Bezier 
and then an approximation of that Bezier to straight line segments. This 
might mean it is difficult to get within a tolerance.

Then again, it may be that the Bezier representation is so close to the 
actual circle that it's error is completly swamped by the straight-line 
error, in which case this is not a problem. Also there are an infinite number 
of curves possible and you can't add a new call for every one.

-- 
                   ,~,~,~,~ ~ ~ ~ ~
     /\_       _|_========___         Bill Spitzak
 ~~~/\/\\~~~~~~\____________/~~~~~~~~ spitzak at d2.com




More information about the cairo mailing list