
On 6/26/07, MenTaLguY <mental@...3...> wrote:
On Mon, 25 Jun 2007 10:48:54 -0400, "bulia byak" <buliabyak@...400...> wrote:
On 6/25/07, Bill Baxter <wbaxter@...400...> wrote:
Is there any reason why sp-ellipse.cpp uses .552 as the
ellipse-to-bezier
constant rather than something with a few more digits:
0.55228474983079356
I guess no reason at all, except that it was that way in Sodipodi and nobody came around to fixing it :) Patches are welcome (I think there are several places in the code using 0.552).
...and, of course, it would be preferable for the patch to define a single constant/macro someplace and use that everywhere, rather than writing out 0.55228474983079356 in a bajillion different places.
I do see that it appears also in dropper-context and dyna-draw-context. That seems to be it. But in those two cases I don't think the accuracy matters. They're both just trying to get something round-ish. They don't really need perfect circle/ellipses for what they're doing. But in the sp-ellipse case it's being used to implement rendering of the SVG arc-to path command, so (short of actually switching to use real elliptical arcs) it should use the best approximation it can get.
But y'know. I just did a side by side comparison, and I can see a lick of difference between an ellipse drawn in inkscape, and the same ellipse rendered by Mozilla or another random drawing program I have lying about. So I guess .552 really is good enuf.
--bb