[cairo] Re-working cairo_current_path

Bill Spitzak spitzak at d2.com
Mon Jan 24 21:45:15 PST 2005


My preference is for something like this:

typedef struct {
   enum {...} type;
   float x,y;
} cairo_path_elt_t;

Anything requiring more than 2 numbers would take more than 1 entry in 
the array. A curve be CURVE,MORE,MORE where MORE is a type shared by all 
things needing more than 2 numbers, making it easy to write code to skip 
them.

Also CLOSEPATH must be identified but could contain the x,y of the 
starting point.

To make sizeof predictable it might be necessary to make type be a 
floating point number as well.

Keith Packard wrote:
> Around 11 o'clock on Jan 24, Carl Worth wrote:
> 
> 
>>Keith, what was your proposed data structure for the path? A list of
>>double with magic values to specify each operator?



More information about the cairo mailing list