[cairo-bugs] [Bug 23364] Useless digits for float numbers in Cairo output

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Aug 28 13:37:15 PDT 2009


http://bugs.freedesktop.org/show_bug.cgi?id=23364





--- Comment #13 from Carl Worth <cworth at cworth.org>  2009-08-28 13:37:11 PST ---
(In reply to comment #11)
> If you really want to control the output precision now you can edit the
> "#define SIGNIFICANT_DIGITS_AFTER_DECIMAL" at the top of
> src/cairo-output-stream.c.

Hi Adrian,

Thanks for providing an idea that can be used immediately, (even if only
at compile time).

> I don't think overloading the meaning of cairo_set_tolerance() to control
> floating point precision in vector backends as well as the tolerance of curve
> flattening in image backends and is good API design.

[snip many details of many uses of floating-point values in PDF backend]

> There really isn't any way to control the output precision of all these
> different floats with one paramater.

That's definitely true. In the meantime, cairo_set_tolerance exists today
and to the extent that it has a well-defined semantic, I think the PDF
backend should implement that semantic wherever it makes sense.

This bug report isn't really the right place for API discussion, so I
suggest that any proposals for changes to the documentation of
cairo_set_tolerance, (if anyone has any), go happen on the cairo
mailing list.

>                                      Maybe the proposed debug environment
> variable would be a good way to set the precision particularly as many
> applications are unlikely to make available a user configurable setting for
> output precision.

That's probably a very good approach for getting some run-time control
for what you described above, (some of which seems obviously separate
from a notion of "tolerance", which in my view is quite tightly bound
to a geometric context).

-Carl


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list