[cairo] Engaging 64 bit precision
Richard Procter
richard.n.procter at gmail.com
Wed Aug 11 19:25:01 PDT 2010
On 12/08/2010, at 9:14 AM, Richard Procter wrote:
> Hi there,
>
> I'd like to use a 64 bit type in cairo's path calculations and at
> least 30 bits of fractional precision. This looks tantalizingly
> possible going by the defines in cairo-fixed-type-private.h.
>
> Has anyone already done this or have any pointers on how to go
> about it?
>
> I see there's a warning that CAIRO_FIXED_BITS "must be 32" as the
> tesselator makes assumptions about the fixed type, however I don't
> believe I'm using it as I am using/abusing cairo only for its clean
> path construction API and python bindings (having pdf debug output
> in development has also been very handy, too).
FWIW, here's is my beginner's successfully compiled but untested
first attempt to boost CAIRO_FIXED_BITS to the maximum 64 bit double
precision of 52 bits.
It causes GCC to emit a few integer overflow warnings in cario-
analysis-surface.c:{807, 808} and cairo-pattern.c:{2283,2284}.
Comments welcome.
regards,
Richard.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 52bit.patch
Type: application/octet-stream
Size: 5774 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100812/980b4cf6/attachment.obj>
-------------- next part --------------
>
> Has anyone already done this or have any pointers on how to go
> about it?
>
> I see there's a warning that CAIRO_FIXED_BITS "must be 32" as the
> tesselator makes assumptions about the fixed type, however I don't
> believe I'm using it as I am using/abusing cairo only for its clean
> path construction API and python bindings (having pdf debug output
> in development has also been very handy, too).
>
> many thanks,
> Richard.
>
>
More information about the cairo
mailing list