summaryrefslogtreecommitdiff
path: root/src/cairo-types-private.h
diff options
context:
space:
mode:
authorSøren Sandmann <sandmann@redhat.com>2009-02-17 22:52:50 -0500
committerSøren Sandmann Pedersen <sandmann@daimi.au.dk>2009-03-28 18:01:19 -0400
commitfcdca966941f4f7cc908bd46df1ec9a6b0f757c1 (patch)
tree5f3f3d1b8b8a2add2ca4a484cfbfee10d227b579 /src/cairo-types-private.h
parentcfa7a384b730289233bef556fe1919f781eac684 (diff)
[region] Always define cairo_rectangle_int_t with ints
Use ints in cairo_rectangle_int_t, no matter the fixed type.
Diffstat (limited to 'src/cairo-types-private.h')
-rw-r--r--src/cairo-types-private.h38
1 files changed, 9 insertions, 29 deletions
diff --git a/src/cairo-types-private.h b/src/cairo-types-private.h
index e8cf4b1f..f0754261 100644
--- a/src/cairo-types-private.h
+++ b/src/cairo-types-private.h
@@ -218,37 +218,17 @@ typedef struct _cairo_trapezoid {
cairo_line_t left, right;
} cairo_trapezoid_t;
-struct _cairo_rectangle_int16 {
- int16_t x, y;
- uint16_t width, height;
-};
-
-struct _cairo_rectangle_int32 {
- int32_t x, y;
- uint32_t width, height;
-};
+typedef struct _cairo_rectangle_int {
+ int x, y;
+ unsigned int width, height;
+} cairo_rectangle_int_t;
-struct _cairo_point_int16 {
- int16_t x, y;
-};
-
-struct _cairo_point_int32 {
- int32_t x, y;
-};
+typedef struct _cairo_point_int {
+ int x, y;
+} cairo_point_int_t;
-#if CAIRO_FIXED_BITS == 32 && CAIRO_FIXED_FRAC_BITS >= 16
-typedef struct _cairo_rectangle_int16 cairo_rectangle_int_t;
-typedef struct _cairo_point_int16 cairo_point_int_t;
-#define CAIRO_RECT_INT_MIN (INT16_MIN >> (CAIRO_FIXED_FRAC_BITS - 16))
-#define CAIRO_RECT_INT_MAX (INT16_MAX >> (CAIRO_FIXED_FRAC_BITS - 16))
-#elif CAIRO_FIXED_BITS == 32
-typedef struct _cairo_rectangle_int32 cairo_rectangle_int_t;
-typedef struct _cairo_point_int32 cairo_point_int_t;
-#define CAIRO_RECT_INT_MIN (INT32_MIN >> CAIRO_FIXED_FRAC_BITS)
-#define CAIRO_RECT_INT_MAX (INT32_MAX >> CAIRO_FIXED_FRAC_BITS)
-#else
-#error Not sure how to pick a cairo_rectangle_int_t and cairo_point_int_t for your CAIRO_FIXED_BITS!
-#endif
+#define CAIRO_RECT_INT_MIN (INT_MIN >> CAIRO_FIXED_FRAC_BITS)
+#define CAIRO_RECT_INT_MAX (INT_MAX >> CAIRO_FIXED_FRAC_BITS)
/* Rectangles that take part in a composite operation.
*