Subject: | ellipse centre when even diameters |
Date: | Sun, 14 Nov 2010 11:33:08 +1100 |
To: | bug-Prima [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
For Prima::Drawable ellipse(), if the DIAMETER_X value is even, is it
specified whether you should round the X coordinate up or down when
giving the centre? Eg. a 4x4 circle,
0123
**
* *
* *
**
The X would be 1 would it, or 2? The docs might have a couple of words
of guidance, presuming it is (or is meant to be) consistent across x11
vs msdos etc backends.
Nosing around the code I saw a bit of x - (dX+1)/2 + 1 for XDrawArc, but
wasn't sure if it and the hairy calculate_ellipse_divergence() expressed
a documented feature. :-)