[cairo-bugs] [Bug 25814] Cairo Quartz should be using CGFloat

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Dec 29 00:09:00 PST 2009


--- Comment #2 from Kristian Rietveld <kris at gtk.org>  2009-12-28 23:29:21 PST ---
(In reply to comment #1)
> If CGFloat isn't available without the 10.6 SDK, then I'd suggest that we don't
> use it -- instead, we should have a cairo typedef, cairo_quartz_float_t or
> something similar that's a float on 32-bit and a double on 64-bit builds. 

> (Could also typedef CGFloat if it isn't present in the current SDK version --
> always to float -- but that might be fragile.)

That would be easiest, since it will save you the hassle of detecting against
which system libraries you are building (which might be fragile as well).  A
possible construction could be (that has to be placed after inclusion of the
system headers):

typedef CGFloat cairo_quartz_float_t;
typedef float cairo_quartz_float_t;

The system headers define CGFLOAT_DEFINED right after the CGFloat typedef and
otherwise the define will not be there.  To me this seems something we can
safely rely on.

--- Comment #3 from Kristian Rietveld <kris at gtk.org>  2009-12-29 00:08:55 PST ---
Created an attachment (id=32340)
 --> (http://bugs.freedesktop.org/attachment.cgi?id=32340)
[quartz] Define cairo_quartz_float_t and use instead of float

This is a patch replacing all usages of float with cairo_quartz_float_t.  I
have not touched the current usages of double, because when done these would
become floats on 32-bit Mac builds, which is probably not wished.

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