[cairo] cairo arc drawing limitation
Fabien Costantini
fab672000 at yahoo.fr
Mon Jul 10 03:21:45 PDT 2006
Hi I just dived in documentation, and noticed that the only way to get an ellipse
path drawn seems to use the transformation matrix.
This approach, though at first sight elegant, seems quite limitative to me, in effect :
1. To achieve a scale, you have to know what is the current scaling policies, in particular, when dimensions are not in the [0,1] space but in standard pixel width,height coordinates; it implies that you keep track of the width and height of your current drawing surface to achieve aa correct scale. Also a matrix translate accumulation has to be done (and possibly the inverse translate after the operation)
2. most of the time you have to save and restore the context, that could be be avoided
Wouldn't it be faster to run and simpler to code
just to add one parameter to specify a height possibly different from the width in cairo_arc()
andd cairo_negative_arc() ?
It would then be more orthogonal with other path construction API like cairo_rectangle()
(there is fortunately no need to use a cairo_square() function and a transformation matrix to draw a rectangle)
Any thoughts ?
Fabien
More information about the cairo
mailing list