[cairo] 64 bit fixed point in Cairo?

M Joonas Pihlaja jpihlaja at cc.helsinki.fi
Thu Apr 14 05:14:56 PDT 2011

On Thu, 14 Apr 2011, Nicholas Allen wrote:

> The only solution for us that I can see is if cairo could use 64 bit
> fixed point instead of 32 bit. I'm going to take a look at hacking this
> in cairo and seeing how far I get. I take it no one else has yet
> attempted this? If this turns out to be a lot of work we will have to
> consider using another graphics library.

Cairo's 32 bit limitation is baked in at several levels and extends to
pixman as well.  Many people have been concerned about it, but nobody
has provided a working solution that extends it, yet.  All help in
this direction is definitely welcome, but you should be aware that
it's not a trivial change that can be done in a week or two.

In my experience it's easiest to treat cairo (and any other vector
graphics library) as a limited precision device and do most user ->
device transformations and partial clipping (say clip your paths to
some smallish rectangular area surrounding the view port) on the
client side, to let cairo only deal with coordinates in a sane range.
This leaves you in full control of the precision requirements, and
doesn't require you to go all out with full geometric clipping; that
way lies a lot of frustrating work.

If you do end up going with another graphics library, please let us
know which one worked for you.



More information about the cairo mailing list