[cairo] libpixman - libpixregion, libic and slim merged; cairo built with it

Carl Worth cworth at east.isi.edu
Tue Dec 9 14:13:22 PST 2003

On Dec 9, Keith Packard wrote:
 > 'box' objects contain x1,y1 -> x2,y2 values, 'rectangles' contain x,y 
 > width,height values.  Doing that consistently will at least avoid driving 
 > me insane.

That sounds quite sane. I think I'm fine with either, but would prefer
to see only one in the external interface. Rectangles do seem more
prevalent in many interfaces, (Xlib, cairo, PS, SVG, etc.).

And, by the way, I should point out that Keith's opinions regarding
libpixman are much more authoritative than mine. I've only recently,
and almost trivially touched this code, while he has
written/maintained/used it for years.

 > Why don't you just eliminate both of these.  They're special cases used 
 > within the X server to speed up window region computations.  If the 
 > underlying region structure is visible, then the server can code up these 
 > functions independently.  And, given that we have over 10 years
 > experience with the current datatypes, it doesn't seem crazy to make them 
 > public even at the risk of freezing out development of alternative 
 > datastructures.

That would be fine with me. But, note that there are currently two
different options for the data structure, (one in Xlib and one in the
server). If I remember correctly, I chose the server version for the
PixRegion implementation --- it has an optimization for storing a
single-rectangle region with less memory.

 > One thing we might do is tag the region datatypes with the fundemental 
 > coordinate datatype somehow (like pixman_int16_t and pixman_box16_t) so 
 > that we can create a pixmap_box32_t when the pixel coordinate space 
 > expands beyond 16 bits.  With PostScript output at 2400dpi, we're already 
 > limited to 13 inches, which seems rather tight.

Looks good to me.


More information about the cairo mailing list