[cairo] cairo internal design ideas

dirk.schoenberger at sz-online.de dirk.schoenberger at sz-online.de
Thu Sep 23 00:37:24 PDT 2004


> I believe somebody else posted `basket.pdf'---the top is not an arc, it's
> not even beziers pretending to be an arc.  When it comes to efficiency,
> the
> ideal output would be:
>
>   2 w                   % stroke width
>   0.3 0 0 RG            % fill colour
>   0 g                   % stroke colour
>   0 0 m                 % moveto bottom left
>   100 0 l               % bottom right
>   70 20  30 20  0 0 c   % arc, right, left, back to start.
>   b                     % closepath, then fill, then stroke
>
> (These can be derived roughly 1:1 from the commands Cairo received).
>

But this would mean that the set of "drawing primitives" in cairo should
be extended, no?
Currently we have only moveto, curveto, lineto,
while e.g. the SVG operators (horizontal lineto, cubic bezier curve
segment and such, are "flattened" to the basic operators.
>From what I understood, the more high level operations are rather
different between the "Postscript and descendants" graphics APIs, ie
Postscript, PDF, SVG.

Regards
Dirk



More information about the cairo mailing list