[cairo] Pixman coordinates

Soeren Sandmann sandmann at daimi.au.dk
Tue Jul 6 08:48:03 PDT 2010


M Joonas Pihlaja <jpihlaja at cc.helsinki.fi> writes:

> > I heard there were plans to switch Pixman to 24.8 coordinate format.
> 
> I don't recall this plan exactly, but it's plausible Soren had a 24.8 
> pixman branch at some point, but I don't see it at a glance of his 
> branches.  He's got a branch for everything else under the sun.  
> Cairo itself switched from 16.16 to 24.8 around 2006-2007 IIRC.  In 
> any case, perhaps internally pixman may switch, but the core X 
> protocol's 16.16 coordinate format won't change, so unless the pixman 
> API changes too (and it might, as an API shake up has been on the 
> table) you probably won't see the 32k limit lifted.

As far as pixman is concerned, I consider the remaining 16 bit
limitations bugs that should be fixed. Here are some that remains:

- Transformations are stored in 16.16 fixed point internally.

- Gradients have some coordinate system issues. 

- Trapezoids use 16.16 coordinates. I'd probably take a patch to make
  them use 24.8 internally (and add a corresponding 24.8 API), but a
  better solution would be to add a polygon image type.

I think these things can be fixed without breaking the pixman API, but
as you say, changing the API at some point is not off the table.


Soren


More information about the cairo mailing list