Add missing FixedToFloat defines

This commit is contained in:
vladimir%pobox.com 2006-01-10 23:57:00 +00:00
Родитель f928d272a8
Коммит e55af72363
2 изменённых файлов: 31 добавлений и 0 удалений

Просмотреть файл

@ -40,6 +40,16 @@
#include "cairo.h"
#include "cairo-quartz-private.h"
/*
* FixedToFloat/FloatToFixed are 10.3+ SDK items - include definitions
* here so we can use older SDKs.
*/
#ifndef FixedToFloat
#define fixed1 ((Fixed) 0x00010000L)
#define FixedToFloat(a) ((float)(a) / fixed1)
#define FloatToFixed(a) ((Fixed)((float)(a) * fixed1))
#endif
typedef struct _cairo_atsui_font_face cairo_atsui_font_face_t;
typedef struct _cairo_atsui_font cairo_atsui_font_t;

Просмотреть файл

@ -166,3 +166,24 @@ Index: pixman/src/fbcompose.c
#include <math.h>
// #define PIXMAN_CONVOLUTION
Index: src/cairo-atsui-font.c
===================================================================
--- src/cairo-atsui-font.c.orig
+++ src/cairo-atsui-font.c
@@ -40,6 +40,16 @@
#include "cairo.h"
#include "cairo-quartz-private.h"
+/*
+ * FixedToFloat/FloatToFixed are 10.3+ SDK items - include definitions
+ * here so we can use older SDKs.
+ */
+#ifndef FixedToFloat
+#define fixed1 ((Fixed) 0x00010000L)
+#define FixedToFloat(a) ((float)(a) / fixed1)
+#define FloatToFixed(a) ((Fixed)((float)(a) * fixed1))
+#endif
+
typedef struct _cairo_atsui_font_face cairo_atsui_font_face_t;
typedef struct _cairo_atsui_font cairo_atsui_font_t;