[cairo-commit] 3 commits - src/cairo-analysis-surface.c src/cairo-atsui-font.c src/cairo.c src/cairo-clip.c src/cairo-clip-private.h src/cairo-directfb-surface.c src/cairo-glitz-surface.c src/cairo-image-surface.c src/cairoint.h src/cairo-meta-surface.c src/cairo-paginated-surface.c src/cairo-pattern.c src/cairo-pdf-surface.c src/cairo-ps-surface.c src/cairo-quartz-private.h src/cairo-quartz-surface.c src/cairo-rectangle.c src/cairo-region.c src/cairo-scaled-font.c src/cairo-surface.c src/cairo-surface-fallback.c src/cairo-surface-fallback-private.h src/cairo-svg-surface.c src/cairo-traps.c src/cairo-wideint.h src/cairo-win32-private.h src/cairo-win32-surface.c src/cairo-xcb-surface.c src/cairo-xlib-surface.c src/test-fallback-surface.c src/test-meta-surface.c src/test-paginated-surface.c

Carl Worth cworth at kemper.freedesktop.org
Tue Jun 6 17:13:18 PDT 2006


 src/cairo-analysis-surface.c         |    2 -
 src/cairo-atsui-font.c               |    2 -
 src/cairo-clip-private.h             |    6 ++--
 src/cairo-clip.c                     |    6 ++--
 src/cairo-directfb-surface.c         |   16 +++++------
 src/cairo-glitz-surface.c            |   16 +++++------
 src/cairo-image-surface.c            |   12 ++++----
 src/cairo-meta-surface.c             |    6 ++--
 src/cairo-paginated-surface.c        |    6 ++--
 src/cairo-pattern.c                  |   12 ++++----
 src/cairo-pdf-surface.c              |    4 +-
 src/cairo-ps-surface.c               |    4 +-
 src/cairo-quartz-private.h           |    2 -
 src/cairo-quartz-surface.c           |   10 +++----
 src/cairo-rectangle.c                |   10 +++----
 src/cairo-region.c                   |    8 ++---
 src/cairo-scaled-font.c              |    6 ++--
 src/cairo-surface-fallback-private.h |    2 -
 src/cairo-surface-fallback.c         |   42 +++++++++++++++----------------
 src/cairo-surface.c                  |   36 +++++++++++++-------------
 src/cairo-svg-surface.c              |    2 -
 src/cairo-traps.c                    |    4 +-
 src/cairo-wideint.h                  |    9 ++++++
 src/cairo-win32-private.h            |    4 +-
 src/cairo-win32-surface.c            |   12 ++++----
 src/cairo-xcb-surface.c              |   18 ++++++-------
 src/cairo-xlib-surface.c             |   20 +++++++-------
 src/cairo.c                          |    2 -
 src/cairoint.h                       |   47 ++++++++++++++++-------------------
 src/test-fallback-surface.c          |   10 +++----
 src/test-meta-surface.c              |    4 +-
 src/test-paginated-surface.c         |    2 -
 32 files changed, 174 insertions(+), 168 deletions(-)

New commits:
diff-tree bf458c9c67120a2d175f18447dd710060f0ba014 (from c1855f17624c62e1f7451b3c673bca23a4575ff7)
Author: Carl Worth <cworth at cworth.org>
Date:   Tue Jun 6 17:06:57 2006 -0700

    win32: Add conditional definitions for INT16_{MIN,MAX} and UINT16_MAX now that we use them.

diff --git a/src/cairo-wideint.h b/src/cairo-wideint.h
index aed9e44..1841a44 100644
--- a/src/cairo-wideint.h
+++ b/src/cairo-wideint.h
@@ -55,6 +55,15 @@
 # ifndef HAVE_UINT64_T
 #  define HAVE_UINT64_T 1
 # endif
+# ifndef INT16_MIN
+#  define INT16_MIN	(-32767-1)
+# endif
+# ifndef INT16_MAX
+#  define INT16_MAX	(32767)
+# endif
+# ifndef UINT16_MAX
+#  define UINT16_MAX	(65535)
+# endif
 #else
 #error Cannot find definitions for fixed-width integral types (uint8_t, uint32_t, etc.)
 #endif
diff-tree c1855f17624c62e1f7451b3c673bca23a4575ff7 (from 746f66c3fce6de39ac9afa7be8bcf8f74c750e85)
Author: Carl Worth <cworth at cworth.org>
Date:   Tue Jun 6 16:59:59 2006 -0700

    Remove CAIRO_{MIN,MAX}SHORT which did not distinguish signed vs. unsigned.
    
    Instead, use the standard INT16_{MIN,MAX} and UINT16_{MIN,MAX} as
    appropriate.

diff --git a/src/cairo-meta-surface.c b/src/cairo-meta-surface.c
index 06c8c96..02868e5 100644
--- a/src/cairo-meta-surface.c
+++ b/src/cairo-meta-surface.c
@@ -551,8 +551,8 @@ _cairo_meta_surface_get_extents (void			
 {
     rectangle->x = 0;
     rectangle->y = 0;
-    rectangle->width = CAIRO_MAXSHORT;
-    rectangle->height = CAIRO_MAXSHORT;
+    rectangle->width = UINT16_MAX;
+    rectangle->height = UINT16_MAX;
 
     return CAIRO_STATUS_SUCCESS;
 }
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index c1d29d6..1ea6db0 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -1426,9 +1426,9 @@ _cairo_pattern_get_extents (cairo_patter
 		y = surface_extents.y + sy * surface_extents.height;
 		cairo_matrix_transform_point (&imatrix, &x, &y);
 		if (x < 0) x = 0;
-		if (x > CAIRO_MAXSHORT) x = CAIRO_MAXSHORT;
+		if (x > INT16_MAX) x = INT16_MAX;
 		if (y < 0) y = 0;
-		if (y > CAIRO_MAXSHORT) y = CAIRO_MAXSHORT;
+		if (y > INT16_MAX) y = INT16_MAX;
 		lx = floor (x); rx = ceil (x);
 		ty = floor (y); by = ceil (y);
 		if (!set) {
@@ -1457,8 +1457,8 @@ _cairo_pattern_get_extents (cairo_patter
 
     extents->x = 0;
     extents->y = 0;
-    extents->width = CAIRO_MAXSHORT;
-    extents->height = CAIRO_MAXSHORT;
+    extents->width = UINT16_MAX;
+    extents->height = UINT16_MAX;
 
     return CAIRO_STATUS_SUCCESS;
 }
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 70e54d4..6b34b26 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -789,8 +789,8 @@ _cairo_scaled_font_glyph_device_extents 
 {
     cairo_status_t status = CAIRO_STATUS_SUCCESS;
     int i;
-    int min_x = CAIRO_MAXSHORT, max_x = CAIRO_MINSHORT;
-    int	min_y = CAIRO_MAXSHORT, max_y = CAIRO_MINSHORT;
+    int min_x = INT16_MAX, max_x = INT16_MIN;
+    int	min_y = INT16_MAX, max_y = INT16_MAX;
 
     if (scaled_font->status)
 	return scaled_font->status;
diff --git a/src/cairo-traps.c b/src/cairo-traps.c
index 58b5146..cb9e9e4 100644
--- a/src/cairo-traps.c
+++ b/src/cairo-traps.c
@@ -73,8 +73,8 @@ _cairo_traps_init (cairo_traps_t *traps)
 
     traps->traps_size = 0;
     traps->traps = NULL;
-    traps->extents.p1.x = traps->extents.p1.y = CAIRO_MAXSHORT << 16;
-    traps->extents.p2.x = traps->extents.p2.y = CAIRO_MINSHORT << 16;
+    traps->extents.p1.x = traps->extents.p1.y = INT16_MAX << 16;
+    traps->extents.p2.x = traps->extents.p2.y = INT16_MAX << 16;
 }
 
 void
diff --git a/src/cairoint.h b/src/cairoint.h
index da020a7..04d5146 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -203,9 +203,6 @@ typedef cairo_int128_t	cairo_fixed_96_32
 /* The common 16.16 format gets a shorter name */
 typedef cairo_fixed_16_16_t cairo_fixed_t;
 
-#define CAIRO_MAXSHORT SHRT_MAX
-#define CAIRO_MINSHORT SHRT_MIN
-
 #define CAIRO_ALPHA_IS_OPAQUE(alpha) ((alpha) >= ((double)0xff00 / (double)0xffff))
 #define CAIRO_ALPHA_IS_ZERO(alpha) ((alpha) <= 0.0)
 
diff-tree 746f66c3fce6de39ac9afa7be8bcf8f74c750e85 (from 5570bf0a9e99019ac24b2b856455afcf360c14fc)
Author: Carl Worth <cworth at cworth.org>
Date:   Tue Jun 6 16:54:03 2006 -0700

    Fix bogus cairo_rectangle_fixed_t to be cairo_rectangle_int16_t.
    
    This rectangle has regular integer values, not fixed-point values.
    So the old name was horribly wrong and misleading, (and yes I think
    it was even I that had suggested it).

diff --git a/src/cairo-analysis-surface.c b/src/cairo-analysis-surface.c
index f8b3608..fd764c6 100644
--- a/src/cairo-analysis-surface.c
+++ b/src/cairo-analysis-surface.c
@@ -49,7 +49,7 @@ typedef struct {
 
 static cairo_int_status_t
 _cairo_analysis_surface_get_extents (void	 		*abstract_surface,
-				     cairo_rectangle_fixed_t	*rectangle)
+				     cairo_rectangle_int16_t	*rectangle)
 {
     cairo_analysis_surface_t *surface = abstract_surface;
 
diff --git a/src/cairo-atsui-font.c b/src/cairo-atsui-font.c
index 1f6726e..e444cff 100644
--- a/src/cairo-atsui-font.c
+++ b/src/cairo-atsui-font.c
@@ -574,7 +574,7 @@ _cairo_atsui_font_old_show_glyphs (void	
     int i;
     void *extra = NULL;
     cairo_bool_t can_draw_directly;
-    cairo_rectangle_fixed_t rect;
+    cairo_rectangle_int16_t rect;
 
     /* Check if we can draw directly to the destination surface */
     can_draw_directly = _cairo_surface_is_quartz (generic_surface) &&
diff --git a/src/cairo-clip-private.h b/src/cairo-clip-private.h
index 91d23fb..b1a243e 100644
--- a/src/cairo-clip-private.h
+++ b/src/cairo-clip-private.h
@@ -61,7 +61,7 @@ struct _cairo_clip {
      * clip paths
      */
     cairo_surface_t *surface;
-    cairo_rectangle_fixed_t surface_rect;
+    cairo_rectangle_int16_t surface_rect;
     /*
      * Surface clip serial number to store
      * in the surface when this clip is set
@@ -105,7 +105,7 @@ _cairo_clip_clip (cairo_clip_t       *cl
 
 cairo_private cairo_status_t
 _cairo_clip_intersect_to_rectangle (cairo_clip_t            *clip,
-				    cairo_rectangle_fixed_t *rectangle);
+				    cairo_rectangle_int16_t *rectangle);
 
 cairo_private cairo_status_t
 _cairo_clip_intersect_to_region (cairo_clip_t      *clip,
@@ -117,7 +117,7 @@ _cairo_clip_combine_to_surface (cairo_cl
 				cairo_surface_t               *dst,
 				int                            dst_x,
 				int                            dst_y,
-				const cairo_rectangle_fixed_t *extents);
+				const cairo_rectangle_int16_t *extents);
 
 cairo_private void
 _cairo_clip_translate (cairo_clip_t  *clip,
diff --git a/src/cairo-clip.c b/src/cairo-clip.c
index fff9558..3922913 100644
--- a/src/cairo-clip.c
+++ b/src/cairo-clip.c
@@ -120,7 +120,7 @@ _cairo_clip_reset (cairo_clip_t *clip)
 
 cairo_status_t
 _cairo_clip_intersect_to_rectangle (cairo_clip_t            *clip,
-				    cairo_rectangle_fixed_t *rectangle)
+				    cairo_rectangle_int16_t *rectangle)
 {
     if (!clip)
 	return CAIRO_STATUS_SUCCESS;
@@ -206,7 +206,7 @@ _cairo_clip_combine_to_surface (cairo_cl
 				cairo_surface_t               *dst,
 				int                           dst_x,
 				int                           dst_y,
-				const cairo_rectangle_fixed_t *extents)
+				const cairo_rectangle_int16_t *extents)
 {
     cairo_pattern_union_t pattern;
     cairo_status_t status;
@@ -336,7 +336,7 @@ _cairo_clip_intersect_mask (cairo_clip_t
 {
     cairo_pattern_union_t pattern;
     cairo_box_t extents;
-    cairo_rectangle_fixed_t surface_rect, target_rect;
+    cairo_rectangle_int16_t surface_rect, target_rect;
     cairo_surface_t *surface;
     cairo_status_t status;
 
diff --git a/src/cairo-directfb-surface.c b/src/cairo-directfb-surface.c
index 80f0ff6..825f80f 100644
--- a/src/cairo-directfb-surface.c
+++ b/src/cairo-directfb-surface.c
@@ -231,9 +231,9 @@ static IDirectFBSurface *cairo_directfb_
 
 static cairo_status_t
 _cairo_directfb_surface_get_image (cairo_directfb_surface_t *surface,
-				   cairo_rectangle_fixed_t  *interest,
+				   cairo_rectangle_int16_t  *interest,
 				   cairo_image_surface_t   **image_out,
-				   cairo_rectangle_fixed_t  *rect_out,
+				   cairo_rectangle_int16_t  *rect_out,
 				   DFBSurfaceLockFlags       flags)
 {
 		int pitch;
@@ -389,9 +389,9 @@ _cairo_directfb_surface_release_source_i
 
 		static cairo_status_t
 _cairo_directfb_surface_acquire_dest_image (void                    *abstract_surface,
-				            cairo_rectangle_fixed_t *interest_rect,
+				            cairo_rectangle_int16_t *interest_rect,
 				            cairo_image_surface_t  **image_out,
-				            cairo_rectangle_fixed_t *image_rect_out,
+				            cairo_rectangle_int16_t *image_rect_out,
 				            void                   **image_extra)
 {
 		cairo_directfb_surface_t *surface = abstract_surface;
@@ -402,9 +402,9 @@ _cairo_directfb_surface_acquire_dest_ima
 
 static void
 _cairo_directfb_surface_release_dest_image (void        *abstract_surface,
-				cairo_rectangle_fixed_t *interest_rect,
+				cairo_rectangle_int16_t *interest_rect,
 				cairo_image_surface_t   *image,
-				cairo_rectangle_fixed_t *image_rect,
+				cairo_rectangle_int16_t *image_rect,
 				void                    *image_extra)
 {
 		cairo_directfb_surface_t *surface = abstract_surface;
@@ -515,7 +515,7 @@ static cairo_int_status_t
 _cairo_directfb_surface_fill_rectangles (void		         *abstract_surface,
 				         cairo_operator_t	  op,
 				         const cairo_color_t     *color,
-				         cairo_rectangle_fixed_t	 *rects,
+				         cairo_rectangle_int16_t	 *rects,
 				         int		          n_rects)
 {
 	int i,k;
@@ -584,7 +584,7 @@ _cairo_directfb_surface_set_clip_region 
 
 static cairo_int_status_t
 _cairo_directfb_abstract_surface_get_extents (void	              *abstract_surface,
-				              cairo_rectangle_fixed_t *rectangle)
+				              cairo_rectangle_int16_t *rectangle)
 {
 		if( rectangle ) {
 				cairo_directfb_surface_t *surface = abstract_surface;
diff --git a/src/cairo-glitz-surface.c b/src/cairo-glitz-surface.c
index 4c898f9..6093f04 100644
--- a/src/cairo-glitz-surface.c
+++ b/src/cairo-glitz-surface.c
@@ -111,9 +111,9 @@ _cairo_glitz_surface_create_similar (voi
 
 static cairo_status_t
 _cairo_glitz_surface_get_image (cairo_glitz_surface_t   *surface,
-				cairo_rectangle_fixed_t *interest,
+				cairo_rectangle_int16_t *interest,
 				cairo_image_surface_t  **image_out,
-				cairo_rectangle_fixed_t *rect_out)
+				cairo_rectangle_int16_t *rect_out)
 {
     cairo_image_surface_t *image;
     int			  x1, y1, x2, y2;
@@ -318,9 +318,9 @@ _cairo_glitz_surface_release_source_imag
 
 static cairo_status_t
 _cairo_glitz_surface_acquire_dest_image (void                    *abstract_surface,
-					 cairo_rectangle_fixed_t *interest_rect,
+					 cairo_rectangle_int16_t *interest_rect,
 					 cairo_image_surface_t  **image_out,
-					 cairo_rectangle_fixed_t *image_rect_out,
+					 cairo_rectangle_int16_t *image_rect_out,
 					 void                   **image_extra)
 {
     cairo_glitz_surface_t *surface = abstract_surface;
@@ -340,9 +340,9 @@ _cairo_glitz_surface_acquire_dest_image 
 
 static void
 _cairo_glitz_surface_release_dest_image (void                    *abstract_surface,
-					 cairo_rectangle_fixed_t *interest_rect,
+					 cairo_rectangle_int16_t *interest_rect,
 					 cairo_image_surface_t   *image,
-					 cairo_rectangle_fixed_t *image_rect,
+					 cairo_rectangle_int16_t *image_rect,
 					 void                    *image_extra)
 {
     cairo_glitz_surface_t *surface = abstract_surface;
@@ -920,7 +920,7 @@ static cairo_int_status_t
 _cairo_glitz_surface_fill_rectangles (void		      *abstract_dst,
 				      cairo_operator_t	       op,
 				      const cairo_color_t     *color,
-				      cairo_rectangle_fixed_t *rects,
+				      cairo_rectangle_int16_t *rects,
 				      int		       n_rects)
 {
     cairo_glitz_surface_t *dst = abstract_dst;
@@ -1256,7 +1256,7 @@ _cairo_glitz_surface_set_clip_region (vo
 
 static cairo_int_status_t
 _cairo_glitz_surface_get_extents (void		          *abstract_surface,
-				  cairo_rectangle_fixed_t *rectangle)
+				  cairo_rectangle_int16_t *rectangle)
 {
     cairo_glitz_surface_t *surface = abstract_surface;
 
diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index da0649f..4490fa5 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -528,9 +528,9 @@ _cairo_image_surface_release_source_imag
 
 static cairo_status_t
 _cairo_image_surface_acquire_dest_image (void                    *abstract_surface,
-					 cairo_rectangle_fixed_t *interest_rect,
+					 cairo_rectangle_int16_t *interest_rect,
 					 cairo_image_surface_t  **image_out,
-					 cairo_rectangle_fixed_t *image_rect_out,
+					 cairo_rectangle_int16_t *image_rect_out,
 					 void                   **image_extra)
 {
     cairo_image_surface_t *surface = abstract_surface;
@@ -548,9 +548,9 @@ _cairo_image_surface_acquire_dest_image 
 
 static void
 _cairo_image_surface_release_dest_image (void                    *abstract_surface,
-					 cairo_rectangle_fixed_t *interest_rect,
+					 cairo_rectangle_int16_t *interest_rect,
 					 cairo_image_surface_t   *image,
-					 cairo_rectangle_fixed_t *image_rect,
+					 cairo_rectangle_int16_t *image_rect,
 					 void                    *image_extra)
 {
 }
@@ -777,7 +777,7 @@ static cairo_int_status_t
 _cairo_image_surface_fill_rectangles (void		      *abstract_surface,
 				      cairo_operator_t	       op,
 				      const cairo_color_t     *color,
-				      cairo_rectangle_fixed_t *rects,
+				      cairo_rectangle_int16_t *rects,
 				      int		       num_rects)
 {
     cairo_image_surface_t *surface = abstract_surface;
@@ -950,7 +950,7 @@ _cairo_image_surface_set_clip_region (vo
 
 static cairo_int_status_t
 _cairo_image_surface_get_extents (void			  *abstract_surface,
-				  cairo_rectangle_fixed_t *rectangle)
+				  cairo_rectangle_int16_t *rectangle)
 {
     cairo_image_surface_t *surface = abstract_surface;
 
diff --git a/src/cairo-meta-surface.c b/src/cairo-meta-surface.c
index 31d16a0..06c8c96 100644
--- a/src/cairo-meta-surface.c
+++ b/src/cairo-meta-surface.c
@@ -547,7 +547,7 @@ _cairo_meta_surface_intersect_clip_path 
  */
 static cairo_int_status_t
 _cairo_meta_surface_get_extents (void			 *abstract_surface,
-				 cairo_rectangle_fixed_t *rectangle)
+				 cairo_rectangle_int16_t *rectangle)
 {
     rectangle->x = 0;
     rectangle->y = 0;
diff --git a/src/cairo-paginated-surface.c b/src/cairo-paginated-surface.c
index ed00cb8..f0ed513 100644
--- a/src/cairo-paginated-surface.c
+++ b/src/cairo-paginated-surface.c
@@ -170,7 +170,7 @@ _cairo_paginated_surface_acquire_source_
 {
     cairo_paginated_surface_t *surface = abstract_surface;
     cairo_surface_t *image;
-    cairo_rectangle_fixed_t extents;
+    cairo_rectangle_int16_t extents;
 
     _cairo_surface_get_extents (surface->target, &extents);
 
@@ -317,7 +317,7 @@ _cairo_paginated_surface_intersect_clip_
 
 static cairo_int_status_t
 _cairo_paginated_surface_get_extents (void	              *abstract_surface,
-				      cairo_rectangle_fixed_t *rectangle)
+				      cairo_rectangle_int16_t *rectangle)
 {
     cairo_paginated_surface_t *surface = abstract_surface;
 
@@ -448,7 +448,7 @@ _cairo_paginated_surface_snapshot (void 
 #if 0
     return _cairo_surface_snapshot (other->meta);
 #else
-    cairo_rectangle_fixed_t extents;
+    cairo_rectangle_int16_t extents;
     cairo_surface_t *surface;
 
     _cairo_surface_get_extents (other->target, &extents);
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index f76f492..c1d29d6 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -1395,13 +1395,13 @@ _cairo_pattern_acquire_surfaces (cairo_p
  **/
 cairo_status_t
 _cairo_pattern_get_extents (cairo_pattern_t         *pattern,
-			    cairo_rectangle_fixed_t *extents)
+			    cairo_rectangle_int16_t *extents)
 {
     if (pattern->extend == CAIRO_EXTEND_NONE &&
 	pattern->type == CAIRO_PATTERN_TYPE_SURFACE)
     {
 	cairo_status_t status;
-	cairo_rectangle_fixed_t surface_extents;
+	cairo_rectangle_int16_t surface_extents;
 	cairo_surface_pattern_t *surface_pattern =
 	    (cairo_surface_pattern_t *) pattern;
 	cairo_surface_t *surface = surface_pattern->surface;
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index bdbc11d..9237d52 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -890,7 +890,7 @@ emit_surface_pattern (cairo_pdf_surface_
     cairo_matrix_t cairo_p2d, pdf_p2d;
     cairo_extend_t extend = cairo_pattern_get_extend (&pattern->base);
     int xstep, ystep;
-    cairo_rectangle_fixed_t surface_extents;
+    cairo_rectangle_int16_t surface_extents;
 
     /* XXX: Should do something clever here for PDF source surfaces ? */
 
@@ -1349,7 +1349,7 @@ _cairo_pdf_surface_show_page (void *abst
 
 static cairo_int_status_t
 _cairo_pdf_surface_get_extents (void		        *abstract_surface,
-				cairo_rectangle_fixed_t *rectangle)
+				cairo_rectangle_int16_t *rectangle)
 {
     cairo_pdf_surface_t *surface = abstract_surface;
 
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 0149b14..2ed12f1 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -1374,7 +1374,7 @@ static void
 emit_surface_pattern (cairo_ps_surface_t *surface,
 		      cairo_surface_pattern_t *pattern)
 {
-    cairo_rectangle_fixed_t extents;
+    cairo_rectangle_int16_t extents;
 
     if (_cairo_surface_is_meta (pattern->surface)) {
 	_cairo_output_stream_printf (surface->stream, "/MyPattern {\n");
@@ -1502,7 +1502,7 @@ _cairo_ps_surface_intersect_clip_path (v
 
 static cairo_int_status_t
 _cairo_ps_surface_get_extents (void		       *abstract_surface,
-			       cairo_rectangle_fixed_t *rectangle)
+			       cairo_rectangle_int16_t *rectangle)
 {
     cairo_ps_surface_t *surface = abstract_surface;
 
diff --git a/src/cairo-quartz-private.h b/src/cairo-quartz-private.h
index c6dac4b..ed66700 100644
--- a/src/cairo-quartz-private.h
+++ b/src/cairo-quartz-private.h
@@ -46,7 +46,7 @@ typedef struct cairo_quartz_surface {
 
     cairo_bool_t y_grows_down;
 
-    cairo_rectangle_fixed_t extents;
+    cairo_rectangle_int16_t extents;
 
     pixman_region16_t *clip_region;
 } cairo_quartz_surface_t;
diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index a3237e3..cff15af 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
@@ -64,9 +64,9 @@ _cairo_quartz_surface_acquire_source_ima
 
 static cairo_status_t
 _cairo_quartz_surface_acquire_dest_image(void                    *abstract_surface,
-                                         cairo_rectangle_fixed_t *interest_rect,
+                                         cairo_rectangle_int16_t *interest_rect,
                                          cairo_image_surface_t  **image_out,
-                                         cairo_rectangle_fixed_t *image_rect,
+                                         cairo_rectangle_int16_t *image_rect,
                                          void                   **image_extra)
 {
     cairo_quartz_surface_t *surface = abstract_surface;
@@ -146,9 +146,9 @@ create_image_from_surface (cairo_image_s
 
 static void
 _cairo_quartz_surface_release_dest_image(void                    *abstract_surface,
-                                         cairo_rectangle_fixed_t *intersect_rect,
+                                         cairo_rectangle_int16_t *intersect_rect,
                                          cairo_image_surface_t   *image,
-                                         cairo_rectangle_fixed_t *image_rect,
+                                         cairo_rectangle_int16_t *image_rect,
                                          void                    *image_extra)
 {
     cairo_quartz_surface_t *surface = abstract_surface;
@@ -196,7 +196,7 @@ _cairo_quartz_surface_set_clip_region(vo
 
 static cairo_int_status_t
 _cairo_quartz_surface_get_extents (void                    *abstract_surface,
-				   cairo_rectangle_fixed_t *rectangle)
+				   cairo_rectangle_int16_t *rectangle)
 {
     cairo_quartz_surface_t *surface = abstract_surface;
 
diff --git a/src/cairo-rectangle.c b/src/cairo-rectangle.c
index bf04978..fca4e42 100644
--- a/src/cairo-rectangle.c
+++ b/src/cairo-rectangle.c
@@ -41,19 +41,19 @@
 /* XXX We currently have a confusing mix of boxes and rectangles as
  * exemplified by this function.  A cairo_box_t is a rectangular area
  * represented by the coordinates of the upper left and lower right
- * corners, expressed in fixed point numbers.  A cairo_rectangle_fixed_t is
+ * corners, expressed in fixed point numbers.  A cairo_rectangle_int16_t is
  * also a rectangular area, but represented by the upper left corner
  * and the width and the height, as integer numbers.
  *
- * This function converts a cairo_box_t to a cairo_rectangle_fixed_t by
+ * This function converts a cairo_box_t to a cairo_rectangle_int16_t by
  * increasing the area to the nearest integer coordinates.  We should
- * standardize on cairo_rectangle_fixed_t and cairo_rectangle_fixed_t, and
+ * standardize on cairo_rectangle_int16_t and cairo_rectangle_int16_t, and
  * this function could be renamed to the more reasonable
  * _cairo_rectangle_fixed_round.
  */
 
 void
-_cairo_box_round_to_rectangle (cairo_box_t *box, cairo_rectangle_fixed_t *rectangle)
+_cairo_box_round_to_rectangle (cairo_box_t *box, cairo_rectangle_int16_t *rectangle)
 {
     rectangle->x = _cairo_fixed_integer_floor (box->p1.x);
     rectangle->y = _cairo_fixed_integer_floor (box->p1.y);
@@ -62,7 +62,7 @@ _cairo_box_round_to_rectangle (cairo_box
 }
 
 void
-_cairo_rectangle_intersect (cairo_rectangle_fixed_t *dest, cairo_rectangle_fixed_t *src)
+_cairo_rectangle_intersect (cairo_rectangle_int16_t *dest, cairo_rectangle_int16_t *src)
 {
     int x1, y1, x2, y2;
 
diff --git a/src/cairo-region.c b/src/cairo-region.c
index 88e89f2..057f9fe 100644
--- a/src/cairo-region.c
+++ b/src/cairo-region.c
@@ -37,7 +37,7 @@
 
 /**
  * _cairo_region_create_from_rectangle:
- * @rect: a #cairo_rectangle_fixed_t
+ * @rect: a #cairo_rectangle_int16_t
  *
  * Creates a region with extents initialized from the given
  * rectangle.
@@ -46,7 +46,7 @@
  *    memory couldn't a allocated.
  **/
 pixman_region16_t *
-_cairo_region_create_from_rectangle (cairo_rectangle_fixed_t *rect)
+_cairo_region_create_from_rectangle (cairo_rectangle_int16_t *rect)
 {
     /* We can't use pixman_region_create_simple(), because it doesn't
      * have an error return
@@ -67,11 +67,11 @@ _cairo_region_create_from_rectangle (cai
  * @region: a #pixman_region16_t
  * @rect: rectangle into which to store the extents
  *
- * Gets the bounding box of a region as a cairo_rectangle_fixed_t
+ * Gets the bounding box of a region as a cairo_rectangle_int16_t
  **/
 void
 _cairo_region_extents_rectangle (pixman_region16_t       *region,
-				 cairo_rectangle_fixed_t *rect)
+				 cairo_rectangle_int16_t *rect)
 {
     pixman_box16_t *region_extents = pixman_region_extents (region);
 
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 003af49..70e54d4 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -785,7 +785,7 @@ cairo_status_t
 _cairo_scaled_font_glyph_device_extents (cairo_scaled_font_t	 *scaled_font,
 					 const cairo_glyph_t	 *glyphs,
 					 int                      num_glyphs,
-					 cairo_rectangle_fixed_t *extents)
+					 cairo_rectangle_int16_t *extents)
 {
     cairo_status_t status = CAIRO_STATUS_SUCCESS;
     int i;
diff --git a/src/cairo-surface-fallback-private.h b/src/cairo-surface-fallback-private.h
index 12f575f..89a11cb 100644
--- a/src/cairo-surface-fallback-private.h
+++ b/src/cairo-surface-fallback-private.h
@@ -99,7 +99,7 @@ cairo_private cairo_status_t
 _cairo_surface_fallback_fill_rectangles (cairo_surface_t         *surface,
 					 cairo_operator_t	 op,
 					 const cairo_color_t	 *color,
-					 cairo_rectangle_fixed_t *rects,
+					 cairo_rectangle_int16_t *rects,
 					 int			 num_rects);
 
 cairo_private cairo_status_t
diff --git a/src/cairo-surface-fallback.c b/src/cairo-surface-fallback.c
index 3b3dd03..6210190 100644
--- a/src/cairo-surface-fallback.c
+++ b/src/cairo-surface-fallback.c
@@ -40,9 +40,9 @@
 
 typedef struct {
     cairo_surface_t *dst;
-    cairo_rectangle_fixed_t extents;
+    cairo_rectangle_int16_t extents;
     cairo_image_surface_t *image;
-    cairo_rectangle_fixed_t image_rect;
+    cairo_rectangle_int16_t image_rect;
     void *image_extra;
 } fallback_state_t;
 
@@ -104,7 +104,7 @@ typedef cairo_status_t (*cairo_draw_func
 					     cairo_surface_t               *dst,
 					     int                            dst_x,
 					     int                            dst_y,
-					     const cairo_rectangle_fixed_t *extents);
+					     const cairo_rectangle_int16_t *extents);
 
 static cairo_status_t
 _create_composite_mask_pattern (cairo_surface_pattern_t       *mask_pattern,
@@ -112,7 +112,7 @@ _create_composite_mask_pattern (cairo_su
 				cairo_draw_func_t             draw_func,
 				void                          *draw_closure,
 				cairo_surface_t               *dst,
-				const cairo_rectangle_fixed_t *extents)
+				const cairo_rectangle_int16_t *extents)
 {
     cairo_surface_t *mask;
     cairo_status_t status;
@@ -157,7 +157,7 @@ _clip_and_composite_with_mask (cairo_cli
 			       cairo_draw_func_t              draw_func,
 			       void                          *draw_closure,
 			       cairo_surface_t               *dst,
-			       const cairo_rectangle_fixed_t *extents)
+			       const cairo_rectangle_int16_t *extents)
 {
     cairo_surface_pattern_t mask_pattern;
     cairo_status_t status;
@@ -191,7 +191,7 @@ _clip_and_composite_combine (cairo_clip_
 			     cairo_draw_func_t              draw_func,
 			     void                          *draw_closure,
 			     cairo_surface_t               *dst,
-			     const cairo_rectangle_fixed_t *extents)
+			     const cairo_rectangle_int16_t *extents)
 {
     cairo_surface_t *intermediate;
     cairo_surface_pattern_t dst_pattern;
@@ -279,7 +279,7 @@ _clip_and_composite_source (cairo_clip_t
 			    cairo_draw_func_t              draw_func,
 			    void                          *draw_closure,
 			    cairo_surface_t               *dst,
-			    const cairo_rectangle_fixed_t *extents)
+			    const cairo_rectangle_int16_t *extents)
 {
     cairo_surface_pattern_t mask_pattern;
     cairo_status_t status;
@@ -320,7 +320,7 @@ _clip_and_composite_source (cairo_clip_t
 }
 
 static int
-_cairo_rectangle_empty (const cairo_rectangle_fixed_t *rect)
+_cairo_rectangle_empty (const cairo_rectangle_int16_t *rect)
 {
     return rect->width == 0 || rect->height == 0;
 }
@@ -353,7 +353,7 @@ _clip_and_composite (cairo_clip_t       
 		     cairo_draw_func_t              draw_func,
 		     void                          *draw_closure,
 		     cairo_surface_t               *dst,
-		     const cairo_rectangle_fixed_t *extents)
+		     const cairo_rectangle_int16_t *extents)
 {
     cairo_pattern_union_t solid_pattern;
     cairo_status_t status;
@@ -408,7 +408,7 @@ _composite_trap_region (cairo_clip_t    
 			cairo_operator_t         op,
 			cairo_surface_t         *dst,
 			pixman_region16_t       *trap_region,
-			cairo_rectangle_fixed_t *extents)
+			cairo_rectangle_int16_t *extents)
 {
     cairo_status_t status;
     cairo_pattern_union_t solid_pattern;
@@ -476,7 +476,7 @@ _composite_traps_draw_func (void        
 			    cairo_surface_t               *dst,
 			    int                            dst_x,
 			    int                            dst_y,
-			    const cairo_rectangle_fixed_t *extents)
+			    const cairo_rectangle_int16_t *extents)
 {
     cairo_composite_traps_info_t *info = closure;
     cairo_pattern_union_t pattern;
@@ -513,7 +513,7 @@ _clip_and_composite_trapezoids (cairo_pa
     cairo_status_t status;
     pixman_region16_t *trap_region;
     pixman_region16_t *clear_region = NULL;
-    cairo_rectangle_fixed_t extents;
+    cairo_rectangle_int16_t extents;
     cairo_composite_traps_info_t traps_info;
 
     if (traps->num_traps == 0)
@@ -656,7 +656,7 @@ _cairo_surface_fallback_paint (cairo_sur
 			       cairo_pattern_t	*source)
 {
     cairo_status_t status;
-    cairo_rectangle_fixed_t extents;
+    cairo_rectangle_int16_t extents;
     cairo_box_t box;
     cairo_traps_t traps;
 
@@ -665,7 +665,7 @@ _cairo_surface_fallback_paint (cairo_sur
 	return status;
 
     if (_cairo_operator_bounded_by_source (op)) {
-	cairo_rectangle_fixed_t source_extents;
+	cairo_rectangle_int16_t source_extents;
 	status = _cairo_pattern_get_extents (source, &source_extents);
 	if (status)
 	    return status;
@@ -705,7 +705,7 @@ _cairo_surface_mask_draw_func (void     
 			       cairo_surface_t               *dst,
 			       int                            dst_x,
 			       int                            dst_y,
-			       const cairo_rectangle_fixed_t *extents)
+			       const cairo_rectangle_int16_t *extents)
 {
     cairo_pattern_t *mask = closure;
 
@@ -732,7 +732,7 @@ _cairo_surface_fallback_mask (cairo_surf
 			      cairo_pattern_t		*mask)
 {
     cairo_status_t status;
-    cairo_rectangle_fixed_t extents, source_extents, mask_extents;
+    cairo_rectangle_int16_t extents, source_extents, mask_extents;
 
     status = _cairo_surface_get_extents (surface, &extents);
     if (status)
@@ -854,7 +854,7 @@ _cairo_surface_old_show_glyphs_draw_func
 					  cairo_surface_t               *dst,
 					  int                            dst_x,
 					  int                            dst_y,
-					  const cairo_rectangle_fixed_t *extents)
+					  const cairo_rectangle_int16_t *extents)
 {
     cairo_show_glyphs_info_t *glyph_info = closure;
     cairo_pattern_union_t pattern;
@@ -916,7 +916,7 @@ _cairo_surface_fallback_show_glyphs (cai
 				     cairo_scaled_font_t	*scaled_font)
 {
     cairo_status_t status;
-    cairo_rectangle_fixed_t extents, glyph_extents;
+    cairo_rectangle_int16_t extents, glyph_extents;
     cairo_show_glyphs_info_t glyph_info;
 
     status = _cairo_surface_get_extents (surface, &extents);
@@ -1042,11 +1042,11 @@ cairo_status_t
 _cairo_surface_fallback_fill_rectangles (cairo_surface_t         *surface,
 					 cairo_operator_t	  op,
 					 const cairo_color_t	 *color,
-					 cairo_rectangle_fixed_t *rects,
+					 cairo_rectangle_int16_t *rects,
 					 int			  num_rects)
 {
     fallback_state_t state;
-    cairo_rectangle_fixed_t *offset_rects = NULL;
+    cairo_rectangle_int16_t *offset_rects = NULL;
     cairo_status_t status;
     int x1, y1, x2, y2;
     int i;
@@ -1086,7 +1086,7 @@ _cairo_surface_fallback_fill_rectangles 
     /* If the fetched image isn't at 0,0, we need to offset the rectangles */
 
     if (state.image_rect.x != 0 || state.image_rect.y != 0) {
-	offset_rects = malloc (sizeof (cairo_rectangle_fixed_t) * num_rects);
+	offset_rects = malloc (sizeof (cairo_rectangle_int16_t) * num_rects);
 	if (offset_rects == NULL) {
 	    status = CAIRO_STATUS_NO_MEMORY;
 	    goto DONE;
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index f2629c4..39b018c 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -737,9 +737,9 @@ _cairo_surface_release_source_image (cai
  **/
 cairo_status_t
 _cairo_surface_acquire_dest_image (cairo_surface_t         *surface,
-				   cairo_rectangle_fixed_t *interest_rect,
+				   cairo_rectangle_int16_t *interest_rect,
 				   cairo_image_surface_t  **image_out,
-				   cairo_rectangle_fixed_t *image_rect,
+				   cairo_rectangle_int16_t *image_rect,
 				   void                   **image_extra)
 {
     assert (!surface->finished);
@@ -763,9 +763,9 @@ _cairo_surface_acquire_dest_image (cairo
  **/
 void
 _cairo_surface_release_dest_image (cairo_surface_t         *surface,
-				   cairo_rectangle_fixed_t *interest_rect,
+				   cairo_rectangle_int16_t *interest_rect,
 				   cairo_image_surface_t   *image,
-				   cairo_rectangle_fixed_t *image_rect,
+				   cairo_rectangle_int16_t *image_rect,
 				   void                    *image_extra)
 {
     assert (!surface->finished);
@@ -938,7 +938,7 @@ _cairo_surface_fill_rectangle (cairo_sur
 			       int		    width,
 			       int		    height)
 {
-    cairo_rectangle_fixed_t rect;
+    cairo_rectangle_int16_t rect;
 
     assert (! surface->is_snapshot);
 
@@ -977,7 +977,7 @@ _cairo_surface_fill_region (cairo_surfac
 {
     int num_rects = pixman_region_num_rects (region);
     pixman_box16_t *boxes = pixman_region_rects (region);
-    cairo_rectangle_fixed_t *rects;
+    cairo_rectangle_int16_t *rects;
     cairo_status_t status;
     int i;
 
@@ -1025,7 +1025,7 @@ cairo_status_t
 _cairo_surface_fill_rectangles (cairo_surface_t		*surface,
 				cairo_operator_t         op,
 				const cairo_color_t	*color,
-				cairo_rectangle_fixed_t	*rects,
+				cairo_rectangle_int16_t	*rects,
 				int			 num_rects)
 {
     cairo_int_status_t status;
@@ -1553,7 +1553,7 @@ _cairo_surface_set_clip (cairo_surface_t
 
 cairo_status_t
 _cairo_surface_get_extents (cairo_surface_t         *surface,
-			    cairo_rectangle_fixed_t *rectangle)
+			    cairo_rectangle_int16_t *rectangle)
 {
     cairo_status_t status;
 
@@ -1670,15 +1670,15 @@ _cairo_surface_old_show_glyphs (cairo_sc
 
 static cairo_status_t
 _cairo_surface_composite_fixup_unbounded_internal (cairo_surface_t         *dst,
-						   cairo_rectangle_fixed_t *src_rectangle,
-						   cairo_rectangle_fixed_t *mask_rectangle,
+						   cairo_rectangle_int16_t *src_rectangle,
+						   cairo_rectangle_int16_t *mask_rectangle,
 						   int			    dst_x,
 						   int			    dst_y,
 						   unsigned int		    width,
 						   unsigned int		    height)
 {
-    cairo_rectangle_fixed_t dst_rectangle;
-    cairo_rectangle_fixed_t drawn_rectangle;
+    cairo_rectangle_int16_t dst_rectangle;
+    cairo_rectangle_int16_t drawn_rectangle;
     pixman_region16_t *drawn_region;
     pixman_region16_t *clear_region;
     cairo_status_t status = CAIRO_STATUS_SUCCESS;
@@ -1767,9 +1767,9 @@ _cairo_surface_composite_fixup_unbounded
 					  unsigned int		      width,
 					  unsigned int		      height)
 {
-    cairo_rectangle_fixed_t src_tmp, mask_tmp;
-    cairo_rectangle_fixed_t *src_rectangle = NULL;
-    cairo_rectangle_fixed_t *mask_rectangle = NULL;
+    cairo_rectangle_int16_t src_tmp, mask_tmp;
+    cairo_rectangle_int16_t *src_rectangle = NULL;
+    cairo_rectangle_int16_t *mask_rectangle = NULL;
 
     assert (! dst->is_snapshot);
 
@@ -1842,9 +1842,9 @@ _cairo_surface_composite_shape_fixup_unb
 						unsigned int		    width,
 						unsigned int		    height)
 {
-    cairo_rectangle_fixed_t src_tmp, mask_tmp;
-    cairo_rectangle_fixed_t *src_rectangle = NULL;
-    cairo_rectangle_fixed_t *mask_rectangle = NULL;
+    cairo_rectangle_int16_t src_tmp, mask_tmp;
+    cairo_rectangle_int16_t *src_rectangle = NULL;
+    cairo_rectangle_int16_t *mask_rectangle = NULL;
 
     assert (! dst->is_snapshot);
 
diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index 6cdc905..79575da 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -1378,7 +1378,7 @@ _cairo_svg_surface_fill (void			*abstrac
 
 static cairo_int_status_t
 _cairo_svg_surface_get_extents (void		        *abstract_surface,
-				cairo_rectangle_fixed_t *rectangle)
+				cairo_rectangle_int16_t *rectangle)
 {
     cairo_svg_surface_t *surface = abstract_surface;
 
diff --git a/src/cairo-win32-private.h b/src/cairo-win32-private.h
index d74b84e..8a8ccea 100644
--- a/src/cairo-win32-private.h
+++ b/src/cairo-win32-private.h
@@ -69,11 +69,11 @@ typedef struct _cairo_win32_surface {
 
     cairo_surface_t *image;
 
-    cairo_rectangle_fixed_t clip_rect;
+    cairo_rectangle_int16_t clip_rect;
 
     HRGN saved_clip;
 
-    cairo_rectangle_fixed_t extents;
+    cairo_rectangle_int16_t extents;
 } cairo_win32_surface_t;
 
 cairo_status_t
diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
index 8a62df0..404dd4c 100644
--- a/src/cairo-win32-surface.c
+++ b/src/cairo-win32-surface.c
@@ -448,9 +448,9 @@ _cairo_win32_surface_release_source_imag
 
 static cairo_status_t
 _cairo_win32_surface_acquire_dest_image (void                    *abstract_surface,
-					 cairo_rectangle_fixed_t *interest_rect,
+					 cairo_rectangle_int16_t *interest_rect,
 					 cairo_image_surface_t  **image_out,
-					 cairo_rectangle_fixed_t *image_rect,
+					 cairo_rectangle_int16_t *image_rect,
 					 void                   **image_extra)
 {
     cairo_win32_surface_t *surface = abstract_surface;
@@ -516,9 +516,9 @@ _cairo_win32_surface_acquire_dest_image 
 
 static void
 _cairo_win32_surface_release_dest_image (void                    *abstract_surface,
-					 cairo_rectangle_fixed_t *interest_rect,
+					 cairo_rectangle_int16_t *interest_rect,
 					 cairo_image_surface_t   *image,
-					 cairo_rectangle_fixed_t *image_rect,
+					 cairo_rectangle_int16_t *image_rect,
 					 void                    *image_extra)
 {
     cairo_win32_surface_t *surface = abstract_surface;
@@ -811,7 +811,7 @@ static cairo_int_status_t
 _cairo_win32_surface_fill_rectangles (void			*abstract_surface,
 				      cairo_operator_t		op,
 				      const cairo_color_t	*color,
-				      cairo_rectangle_fixed_t		*rects,
+				      cairo_rectangle_int16_t		*rects,
 				      int			num_rects)
 {
     cairo_win32_surface_t *surface = abstract_surface;
@@ -964,7 +964,7 @@ _cairo_win32_surface_set_clip_region (vo
 
 static cairo_int_status_t
 _cairo_win32_surface_get_extents (void		          *abstract_surface,
-				  cairo_rectangle_fixed_t *rectangle)
+				  cairo_rectangle_int16_t *rectangle)
 {
     cairo_win32_surface_t *surface = abstract_surface;
 
diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index 2c1e669..7cbee54 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -378,9 +378,9 @@ _CAIRO_MASK_FORMAT (cairo_format_masks_t
 
 static cairo_status_t
 _get_image_surface (cairo_xcb_surface_t     *surface,
-		    cairo_rectangle_fixed_t *interest_rect,
+		    cairo_rectangle_int16_t *interest_rect,
 		    cairo_image_surface_t  **image_out,
-		    cairo_rectangle_fixed_t *image_rect)
+		    cairo_rectangle_int16_t *image_rect)
 {
     cairo_image_surface_t *image;
     XCBGetImageRep *imagerep;
@@ -396,7 +396,7 @@ _get_image_surface (cairo_xcb_surface_t 
     y2 = surface->height;
 
     if (interest_rect) {
-	cairo_rectangle_fixed_t rect;
+	cairo_rectangle_int16_t rect;
 
 	rect.x = interest_rect->x;
 	rect.y = interest_rect->y;
@@ -623,9 +623,9 @@ _cairo_xcb_surface_release_source_image 
 
 static cairo_status_t
 _cairo_xcb_surface_acquire_dest_image (void                    *abstract_surface,
-				       cairo_rectangle_fixed_t *interest_rect,
+				       cairo_rectangle_int16_t *interest_rect,
 				       cairo_image_surface_t  **image_out,
-				       cairo_rectangle_fixed_t *image_rect_out,
+				       cairo_rectangle_int16_t *image_rect_out,
 				       void                   **image_extra)
 {
     cairo_xcb_surface_t *surface = abstract_surface;
@@ -644,9 +644,9 @@ _cairo_xcb_surface_acquire_dest_image (v
 
 static void
 _cairo_xcb_surface_release_dest_image (void                   *abstract_surface,
-				       cairo_rectangle_fixed_t      *interest_rect,
+				       cairo_rectangle_int16_t      *interest_rect,
 				       cairo_image_surface_t  *image,
-				       cairo_rectangle_fixed_t      *image_rect,
+				       cairo_rectangle_int16_t      *image_rect,
 				       void                   *image_extra)
 {
     cairo_xcb_surface_t *surface = abstract_surface;
@@ -943,7 +943,7 @@ static cairo_int_status_t
 _cairo_xcb_surface_fill_rectangles (void			     *abstract_surface,
 				     cairo_operator_t	      op,
 				     const cairo_color_t	*     color,
-				     cairo_rectangle_fixed_t *rects,
+				     cairo_rectangle_int16_t *rects,
 				     int			      num_rects)
 {
     cairo_xcb_surface_t *surface = abstract_surface;
@@ -1037,7 +1037,7 @@ _cairo_xcb_surface_composite_trapezoids 
 
 static cairo_int_status_t
 _cairo_xcb_surface_get_extents (void		        *abstract_surface,
-				cairo_rectangle_fixed_t *rectangle)
+				cairo_rectangle_int16_t *rectangle)
 {
     cairo_xcb_surface_t *surface = abstract_surface;
 
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index bc2525f..a34862a 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -503,9 +503,9 @@ _swap_ximage_to_native (XImage *ximage)
 
 static cairo_status_t
 _get_image_surface (cairo_xlib_surface_t    *surface,
-		    cairo_rectangle_fixed_t *interest_rect,
+		    cairo_rectangle_int16_t *interest_rect,
 		    cairo_image_surface_t  **image_out,
-		    cairo_rectangle_fixed_t *image_rect)
+		    cairo_rectangle_int16_t *image_rect)
 {
     cairo_image_surface_t *image;
     XImage *ximage;
@@ -519,7 +519,7 @@ _get_image_surface (cairo_xlib_surface_t
     y2 = surface->height;
 
     if (interest_rect) {
-	cairo_rectangle_fixed_t rect;
+	cairo_rectangle_int16_t rect;
 
 	rect.x = interest_rect->x;
 	rect.y = interest_rect->y;
@@ -809,9 +809,9 @@ _cairo_xlib_surface_release_source_image
 
 static cairo_status_t
 _cairo_xlib_surface_acquire_dest_image (void                    *abstract_surface,
-					cairo_rectangle_fixed_t *interest_rect,
+					cairo_rectangle_int16_t *interest_rect,
 					cairo_image_surface_t  **image_out,
-					cairo_rectangle_fixed_t *image_rect_out,
+					cairo_rectangle_int16_t *image_rect_out,
 					void                   **image_extra)
 {
     cairo_xlib_surface_t *surface = abstract_surface;
@@ -830,9 +830,9 @@ _cairo_xlib_surface_acquire_dest_image (
 
 static void
 _cairo_xlib_surface_release_dest_image (void                    *abstract_surface,
-					cairo_rectangle_fixed_t *interest_rect,
+					cairo_rectangle_int16_t *interest_rect,
 					cairo_image_surface_t   *image,
-					cairo_rectangle_fixed_t *image_rect,
+					cairo_rectangle_int16_t *image_rect,
 					void                    *image_extra)
 {
     cairo_xlib_surface_t *surface = abstract_surface;
@@ -1400,7 +1400,7 @@ static cairo_int_status_t
 _cairo_xlib_surface_fill_rectangles (void		     *abstract_surface,
 				     cairo_operator_t	      op,
 				     const cairo_color_t     *color,
-				     cairo_rectangle_fixed_t *rects,
+				     cairo_rectangle_int16_t *rects,
 				     int			      num_rects)
 {
     cairo_xlib_surface_t *surface = abstract_surface;
@@ -1701,7 +1701,7 @@ _cairo_xlib_surface_set_clip_region (voi
 
 static cairo_int_status_t
 _cairo_xlib_surface_get_extents (void		         *abstract_surface,
-				 cairo_rectangle_fixed_t *rectangle)
+				 cairo_rectangle_int16_t *rectangle)
 {
     cairo_xlib_surface_t *surface = abstract_surface;
 
@@ -2644,7 +2644,7 @@ _cairo_xlib_surface_show_glyphs (void   
                                                  (cairo_surface_t **) &src,
                                                  &attributes);
     } else {
-        cairo_rectangle_fixed_t glyph_extents;
+        cairo_rectangle_int16_t glyph_extents;
 
         status = _cairo_scaled_font_glyph_device_extents (scaled_font,
                                                           glyphs,
diff --git a/src/cairo.c b/src/cairo.c
index 640cf7d..9460bf2 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -400,7 +400,7 @@ void
 cairo_push_group_with_content (cairo_t *cr, cairo_content_t content)
 {
     cairo_status_t status;
-    cairo_rectangle_fixed_t extents;
+    cairo_rectangle_int16_t extents;
     cairo_surface_t *group_surface = NULL;
 
     /* Get the extents that we'll use in creating our new group surface */
diff --git a/src/cairoint.h b/src/cairoint.h
index 3a9c993..da020a7 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -243,10 +243,10 @@ typedef struct _cairo_trapezoid {
     cairo_line_t left, right;
 } cairo_trapezoid_t;
 
-typedef struct _cairo_rectangle {
-    short x, y;
-    unsigned short width, height;
-} cairo_rectangle_fixed_t, cairo_glyph_size_t;
+typedef struct _cairo_rectangle_int16 {
+    int16_t x, y;
+    uint16_t width, height;
+} cairo_rectangle_int16_t, cairo_glyph_size_t;
 
 /* Sure wish C had a real enum type so that this would be distinct
    from cairo_status_t. Oh well, without that, I'll use this bogus 1000
@@ -332,10 +332,10 @@ typedef struct _cairo_image_surface cair
 typedef struct _cairo_surface_backend cairo_surface_backend_t;
 
 cairo_private void
-_cairo_box_round_to_rectangle (cairo_box_t *box, cairo_rectangle_fixed_t *rectangle);
+_cairo_box_round_to_rectangle (cairo_box_t *box, cairo_rectangle_int16_t *rectangle);
 
 cairo_private void
-_cairo_rectangle_intersect (cairo_rectangle_fixed_t *dest, cairo_rectangle_fixed_t *src);
+_cairo_rectangle_intersect (cairo_rectangle_int16_t *dest, cairo_rectangle_int16_t *src);
 
 /* cairo_array.c structures and functions */
 
@@ -637,16 +637,16 @@ struct _cairo_surface_backend {
 
     cairo_status_t
     (*acquire_dest_image)       (void                    *abstract_surface,
-				 cairo_rectangle_fixed_t *interest_rect,
+				 cairo_rectangle_int16_t *interest_rect,
 				 cairo_image_surface_t  **image_out,
-				 cairo_rectangle_fixed_t *image_rect,
+				 cairo_rectangle_int16_t *image_rect,
 				 void                   **image_extra);
 
     void
     (*release_dest_image)       (void                    *abstract_surface,
-				 cairo_rectangle_fixed_t *interest_rect,
+				 cairo_rectangle_int16_t *interest_rect,
 				 cairo_image_surface_t   *image,
-				 cairo_rectangle_fixed_t *image_rect,
+				 cairo_rectangle_int16_t *image_rect,
 				 void                    *image_extra);
 
     cairo_status_t
@@ -673,7 +673,7 @@ struct _cairo_surface_backend {
     (*fill_rectangles)		(void			 *surface,
 				 cairo_operator_t	  op,
 				 const cairo_color_t     *color,
-				 cairo_rectangle_fixed_t *rects,
+				 cairo_rectangle_int16_t *rects,
 				 int			  num_rects);
 
     /* XXX: dst should be the first argument for consistency */
@@ -747,7 +747,7 @@ struct _cairo_surface_backend {
      */
     cairo_int_status_t
     (*get_extents)		(void			 *surface,
-				 cairo_rectangle_fixed_t *rectangle);
+				 cairo_rectangle_int16_t *rectangle);
 
     /*
      * This is an optional entry to let the surface manage its own glyph
@@ -1561,7 +1561,7 @@ cairo_private cairo_status_t
 _cairo_scaled_font_glyph_device_extents (cairo_scaled_font_t	 *scaled_font,
 					 const cairo_glyph_t	 *glyphs,
 					 int                      num_glyphs,
-					 cairo_rectangle_fixed_t *extents);
+					 cairo_rectangle_int16_t *extents);
 
 cairo_private cairo_status_t
 _cairo_scaled_font_show_glyphs (cairo_scaled_font_t *scaled_font,
@@ -1683,7 +1683,7 @@ cairo_private cairo_status_t
 _cairo_surface_fill_rectangles (cairo_surface_t		*surface,
 				cairo_operator_t         op,
 				const cairo_color_t	*color,
-				cairo_rectangle_fixed_t *rects,
+				cairo_rectangle_int16_t *rects,
 				int			 num_rects);
 
 cairo_private cairo_status_t
@@ -1757,16 +1757,16 @@ _cairo_surface_release_source_image (cai
 
 cairo_private cairo_status_t
 _cairo_surface_acquire_dest_image (cairo_surface_t         *surface,
-				   cairo_rectangle_fixed_t *interest_rect,
+				   cairo_rectangle_int16_t *interest_rect,
 				   cairo_image_surface_t  **image_out,
-				   cairo_rectangle_fixed_t *image_rect,
+				   cairo_rectangle_int16_t *image_rect,
 				   void                   **image_extra);
 
 cairo_private void
 _cairo_surface_release_dest_image (cairo_surface_t        *surface,
-				   cairo_rectangle_fixed_t      *interest_rect,
+				   cairo_rectangle_int16_t      *interest_rect,
 				   cairo_image_surface_t  *image,
-				   cairo_rectangle_fixed_t      *image_rect,
+				   cairo_rectangle_int16_t      *image_rect,
 				   void                   *image_extra);
 
 cairo_private cairo_status_t
@@ -1803,7 +1803,7 @@ _cairo_surface_set_clip (cairo_surface_t
 
 cairo_private cairo_status_t
 _cairo_surface_get_extents (cairo_surface_t         *surface,
-			    cairo_rectangle_fixed_t *rectangle);
+			    cairo_rectangle_int16_t *rectangle);
 
 cairo_private cairo_status_t
 _cairo_surface_old_show_glyphs (cairo_scaled_font_t	*scaled_font,
@@ -2151,7 +2151,7 @@ _cairo_pattern_acquire_surfaces (cairo_p
 
 cairo_private cairo_status_t
 _cairo_pattern_get_extents (cairo_pattern_t	    *pattern,
-			    cairo_rectangle_fixed_t *extents);
+			    cairo_rectangle_int16_t *extents);
 
 cairo_private cairo_status_t
 _cairo_gstate_set_antialias (cairo_gstate_t *gstate,
@@ -2163,11 +2163,11 @@ _cairo_gstate_get_antialias (cairo_gstat
 /* cairo-region.c */
 
 cairo_private pixman_region16_t *
-_cairo_region_create_from_rectangle (cairo_rectangle_fixed_t *rect);
+_cairo_region_create_from_rectangle (cairo_rectangle_int16_t *rect);
 
 cairo_private void
 _cairo_region_extents_rectangle (pixman_region16_t       *region,
-				 cairo_rectangle_fixed_t *rect);
+				 cairo_rectangle_int16_t *rect);
 
 /* cairo_unicode.c */
 
diff --git a/src/test-fallback-surface.c b/src/test-fallback-surface.c
index 60c7749..5c3c08c 100644
--- a/src/test-fallback-surface.c
+++ b/src/test-fallback-surface.c
@@ -136,9 +136,9 @@ _test_fallback_surface_release_source_im
 
 static cairo_status_t
 _test_fallback_surface_acquire_dest_image (void		           *abstract_surface,
-					   cairo_rectangle_fixed_t *interest_rect,
+					   cairo_rectangle_int16_t *interest_rect,
 					   cairo_image_surface_t  **image_out,
-					   cairo_rectangle_fixed_t *image_rect_out,
+					   cairo_rectangle_int16_t *image_rect_out,
 					   void			  **image_extra)
 {
     test_fallback_surface_t *surface = abstract_surface;
@@ -152,9 +152,9 @@ _test_fallback_surface_acquire_dest_imag
 
 static void
 _test_fallback_surface_release_dest_image (void			   *abstract_surface,
-					   cairo_rectangle_fixed_t *interest_rect,
+					   cairo_rectangle_int16_t *interest_rect,
 					   cairo_image_surface_t   *image,
-					   cairo_rectangle_fixed_t *image_rect,
+					   cairo_rectangle_int16_t *image_rect,
 					   void			   *image_extra)
 {
     test_fallback_surface_t *surface = abstract_surface;
@@ -168,7 +168,7 @@ _test_fallback_surface_release_dest_imag
 
 static cairo_int_status_t
 _test_fallback_surface_get_extents (void		            *abstract_surface,
-				    cairo_rectangle_fixed_t *rectangle)
+				    cairo_rectangle_int16_t *rectangle)
 {
     test_fallback_surface_t *surface = abstract_surface;
 
diff --git a/src/test-meta-surface.c b/src/test-meta-surface.c
index 541853c..d50119f 100644
--- a/src/test-meta-surface.c
+++ b/src/test-meta-surface.c
@@ -170,7 +170,7 @@ _test_meta_surface_intersect_clip_path (
 
 static cairo_int_status_t
 _test_meta_surface_get_extents (void			*abstract_surface,
-				cairo_rectangle_fixed_t	*rectangle)
+				cairo_rectangle_int16_t	*rectangle)
 {
     test_meta_surface_t *surface = abstract_surface;
 
@@ -280,7 +280,7 @@ _test_meta_surface_snapshot (void *abstr
 #if 0
     return _cairo_surface_snapshot (other->meta);
 #else
-    cairo_rectangle_fixed_t extents;
+    cairo_rectangle_int16_t extents;
     cairo_surface_t *surface;
 
     _cairo_surface_get_extents (other->image, &extents);
diff --git a/src/test-paginated-surface.c b/src/test-paginated-surface.c
index c00bac8..1bdab6b 100644
--- a/src/test-paginated-surface.c
+++ b/src/test-paginated-surface.c
@@ -139,7 +139,7 @@ _test_paginated_surface_set_clip_region 
 
 static cairo_int_status_t
 _test_paginated_surface_get_extents (void			*abstract_surface,
-				     cairo_rectangle_fixed_t	*rectangle)
+				     cairo_rectangle_int16_t	*rectangle)
 {
     test_paginated_surface_t *surface = abstract_surface;
 


More information about the cairo-commit mailing list