[cairo] Re-working cairo_current_path
Kristian Høgsberg
krh at bitplanet.net
Mon Jan 24 11:11:55 PST 2005
Keith Packard wrote:
> Around 13 o'clock on Jan 24, =?UTF-8?B?S3Jpc3RpYW4gSMO4Z3NiZXJn?= wrote:
>
>
>>What about:
>
>
> Are you proposing that we not have a simple array of these then? That
> seems really funky to me for a public API.
The idea was that you'd have the path elements or varying size
continously laid out in memory. To get from path element p, you'd do
p = (cairo_path_element_t *) ( (char) p + p->length )
with
p->length = offsetof (p, u) + sizeof (u.move_to)
for move_to ops etc.
Either I didn't understand your first proposal, or it's just as funky.
Using doubles for an enumeration value certainly seems unfortunate.
cheers,
Kristian
More information about the cairo
mailing list