Rename cairo_rectangle_t to cairo_rectangle_fixed_t.

This is in preparation for a later function addition for extracting
clip rectangles from a cairo_t, (which will add a public
cairo_rectangle_t).
This commit is contained in:
Robert O'Callahan 2006-05-04 03:43:34 -07:00 committed by Carl Worth
parent d71ddec8df
commit 7bcf957b4e
31 changed files with 358 additions and 360 deletions

View file

@ -48,8 +48,8 @@ typedef struct {
} cairo_analysis_surface_t;
static cairo_int_status_t
_cairo_analysis_surface_get_extents (void *abstract_surface,
cairo_rectangle_t *rectangle)
_cairo_analysis_surface_get_extents (void *abstract_surface,
cairo_rectangle_fixed_t *rectangle)
{
cairo_analysis_surface_t *surface = abstract_surface;

View file

@ -571,7 +571,7 @@ _cairo_atsui_font_old_show_glyphs (void *abstract_font,
int i;
void *extra = NULL;
cairo_bool_t can_draw_directly;
cairo_rectangle_t rect;
cairo_rectangle_fixed_t rect;
/* Check if we can draw directly to the destination surface */
can_draw_directly = _cairo_surface_is_quartz (generic_surface) &&

View file

@ -101,17 +101,17 @@ _cairo_beos_surface_create_internal (BView* view,
bool owns_bitmap_view = false);
static BRect
_cairo_rect_to_brect (const cairo_rectangle_t* rect)
_cairo_rect_to_brect (const cairo_rectangle_fixed_t* rect)
{
// A BRect is one pixel wider than you'd think
return BRect(rect->x, rect->y, rect->x + rect->width - 1,
rect->y + rect->height - 1);
}
static cairo_rectangle_t
static cairo_rectangle_fixed_t
_brect_to_cairo_rect (const BRect& rect)
{
cairo_rectangle_t retval;
cairo_rectangle_fixed_t retval;
retval.x = int(rect.left + 0.5);
retval.y = int(rect.top + 0.5);
retval.width = rect.IntegerWidth() + 1;
@ -549,11 +549,11 @@ _cairo_beos_surface_release_source_image (void *abstract_surfac
static cairo_status_t
_cairo_beos_surface_acquire_dest_image (void *abstract_surface,
cairo_rectangle_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_t *image_rect,
void **image_extra)
_cairo_beos_surface_acquire_dest_image (void *abstract_surface,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_fixed_t *image_rect,
void **image_extra)
{
cairo_beos_surface_t *surface = reinterpret_cast<cairo_beos_surface_t*>(
abstract_surface);
@ -614,11 +614,11 @@ _cairo_beos_surface_acquire_dest_image (void *abstract_surface
static void
_cairo_beos_surface_release_dest_image (void *abstract_surface,
cairo_rectangle_t *intersect_rect,
cairo_image_surface_t *image,
cairo_rectangle_t *image_rect,
void *image_extra)
_cairo_beos_surface_release_dest_image (void *abstract_surface,
cairo_rectangle_fixed_t *intersect_rect,
cairo_image_surface_t *image,
cairo_rectangle_fixed_t *image_rect,
void *image_extra)
{
fprintf(stderr, "Fallback drawing\n");
@ -767,19 +767,19 @@ _cairo_beos_surface_composite (cairo_operator_t op,
static void
_cairo_beos_surface_fill_rectangle (cairo_beos_surface_t *surface,
cairo_rectangle_t *rect)
_cairo_beos_surface_fill_rectangle (cairo_beos_surface_t *surface,
cairo_rectangle_fixed_t *rect)
{
BRect brect(_cairo_rect_to_brect(rect));
surface->view->FillRect(brect);
}
static cairo_int_status_t
_cairo_beos_surface_fill_rectangles (void *abstract_surface,
cairo_operator_t op,
const cairo_color_t *color,
cairo_rectangle_t *rects,
int num_rects)
_cairo_beos_surface_fill_rectangles (void *abstract_surface,
cairo_operator_t op,
const cairo_color_t *color,
cairo_rectangle_fixed_t *rects,
int num_rects)
{
fprintf(stderr, "Drawing %i rectangles\n", num_rects);
cairo_beos_surface_t *surface = reinterpret_cast<cairo_beos_surface_t*>(
@ -862,8 +862,8 @@ _cairo_beos_surface_set_clip_region (void *abstract_surface,
}
static cairo_int_status_t
_cairo_beos_surface_get_extents (void *abstract_surface,
cairo_rectangle_t *rectangle)
_cairo_beos_surface_get_extents (void *abstract_surface,
cairo_rectangle_fixed_t *rectangle)
{
cairo_beos_surface_t *surface = reinterpret_cast<cairo_beos_surface_t*>(
abstract_surface);

View file

@ -61,7 +61,7 @@ struct _cairo_clip {
* clip paths
*/
cairo_surface_t *surface;
cairo_rectangle_t surface_rect;
cairo_rectangle_fixed_t surface_rect;
/*
* Surface clip serial number to store
* in the surface when this clip is set
@ -104,19 +104,19 @@ _cairo_clip_clip (cairo_clip_t *clip,
cairo_surface_t *target);
cairo_private cairo_status_t
_cairo_clip_intersect_to_rectangle (cairo_clip_t *clip,
cairo_rectangle_t *rectangle);
_cairo_clip_intersect_to_rectangle (cairo_clip_t *clip,
cairo_rectangle_fixed_t *rectangle);
cairo_private cairo_status_t
_cairo_clip_intersect_to_region (cairo_clip_t *clip,
pixman_region16_t *region);
cairo_private cairo_status_t
_cairo_clip_combine_to_surface (cairo_clip_t *clip,
cairo_operator_t op,
cairo_surface_t *dst,
int dst_x,
int dst_y,
const cairo_rectangle_t *extents);
_cairo_clip_combine_to_surface (cairo_clip_t *clip,
cairo_operator_t op,
cairo_surface_t *dst,
int dst_x,
int dst_y,
const cairo_rectangle_fixed_t *extents);
#endif /* CAIRO_CLIP_PRIVATE_H */

View file

@ -119,8 +119,8 @@ _cairo_clip_reset (cairo_clip_t *clip)
}
cairo_status_t
_cairo_clip_intersect_to_rectangle (cairo_clip_t *clip,
cairo_rectangle_t *rectangle)
_cairo_clip_intersect_to_rectangle (cairo_clip_t *clip,
cairo_rectangle_fixed_t *rectangle)
{
if (!clip)
return CAIRO_STATUS_SUCCESS;
@ -201,12 +201,12 @@ _cairo_clip_intersect_to_region (cairo_clip_t *clip,
* which has its origin at dst_x, dst_y in backend coordinates
*/
cairo_status_t
_cairo_clip_combine_to_surface (cairo_clip_t *clip,
cairo_operator_t op,
cairo_surface_t *dst,
int dst_x,
int dst_y,
const cairo_rectangle_t *extents)
_cairo_clip_combine_to_surface (cairo_clip_t *clip,
cairo_operator_t op,
cairo_surface_t *dst,
int dst_x,
int dst_y,
const cairo_rectangle_fixed_t *extents)
{
cairo_pattern_union_t pattern;
cairo_status_t status;
@ -336,7 +336,7 @@ _cairo_clip_intersect_mask (cairo_clip_t *clip,
{
cairo_pattern_union_t pattern;
cairo_box_t extents;
cairo_rectangle_t surface_rect, target_rect;
cairo_rectangle_fixed_t surface_rect, target_rect;
cairo_surface_t *surface;
cairo_status_t status;

View file

@ -235,10 +235,10 @@ static IDirectFBSurface *cairo_directfb_buffer_surface_create(IDirectFB *dfb,voi
static cairo_status_t
_cairo_directfb_surface_get_image (cairo_directfb_surface_t *surface,
cairo_rectangle_t *interest,
cairo_image_surface_t **image_out,
cairo_rectangle_t *rect_out,
DFBSurfaceLockFlags flags)
cairo_rectangle_fixed_t *interest,
cairo_image_surface_t **image_out,
cairo_rectangle_fixed_t *rect_out,
DFBSurfaceLockFlags flags)
{
int pitch;
void *data;
@ -395,11 +395,11 @@ _cairo_directfb_surface_release_source_image (void *abstract_surface,
}
static cairo_status_t
_cairo_directfb_surface_acquire_dest_image (void *abstract_surface,
cairo_rectangle_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_t *image_rect_out,
void **image_extra)
_cairo_directfb_surface_acquire_dest_image (void *abstract_surface,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_fixed_t *image_rect_out,
void **image_extra)
{
cairo_directfb_surface_t *surface = abstract_surface;
*image_extra = interest_rect;
@ -408,11 +408,11 @@ _cairo_directfb_surface_acquire_dest_image (void *abstract_surfac
}
static void
_cairo_directfb_surface_release_dest_image (void *abstract_surface,
cairo_rectangle_t *interest_rect,
cairo_image_surface_t *image,
cairo_rectangle_t *image_rect,
void *image_extra)
_cairo_directfb_surface_release_dest_image (void *abstract_surface,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t *image,
cairo_rectangle_fixed_t *image_rect,
void *image_extra)
{
cairo_directfb_surface_t *surface = abstract_surface;
IDirectFBSurface *buffer=surface->buffer;
@ -519,11 +519,11 @@ _cairo_directfb_surface_composite (cairo_operator_t op,
#endif
static cairo_int_status_t
_cairo_directfb_surface_fill_rectangles (void *abstract_surface,
cairo_operator_t op,
const cairo_color_t *color,
cairo_rectangle_t *rects,
int n_rects)
_cairo_directfb_surface_fill_rectangles (void *abstract_surface,
cairo_operator_t op,
const cairo_color_t *color,
cairo_rectangle_fixed_t *rects,
int n_rects)
{
int i,k;
cairo_directfb_surface_t *surface = abstract_surface;
@ -590,8 +590,8 @@ _cairo_directfb_surface_set_clip_region (void *abstract_surface,
}
static cairo_int_status_t
_cairo_directfb_abstract_surface_get_extents (void *abstract_surface,
cairo_rectangle_t *rectangle)
_cairo_directfb_abstract_surface_get_extents (void *abstract_surface,
cairo_rectangle_fixed_t *rectangle)
{
if( rectangle ) {
cairo_directfb_surface_t *surface = abstract_surface;

View file

@ -110,10 +110,10 @@ _cairo_glitz_surface_create_similar (void *abstract_src,
}
static cairo_status_t
_cairo_glitz_surface_get_image (cairo_glitz_surface_t *surface,
cairo_rectangle_t *interest,
cairo_image_surface_t **image_out,
cairo_rectangle_t *rect_out)
_cairo_glitz_surface_get_image (cairo_glitz_surface_t *surface,
cairo_rectangle_fixed_t *interest,
cairo_image_surface_t **image_out,
cairo_rectangle_fixed_t *rect_out)
{
cairo_image_surface_t *image;
int x1, y1, x2, y2;
@ -317,11 +317,11 @@ _cairo_glitz_surface_release_source_image (void *abstract_surface,
}
static cairo_status_t
_cairo_glitz_surface_acquire_dest_image (void *abstract_surface,
cairo_rectangle_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_t *image_rect_out,
void **image_extra)
_cairo_glitz_surface_acquire_dest_image (void *abstract_surface,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_fixed_t *image_rect_out,
void **image_extra)
{
cairo_glitz_surface_t *surface = abstract_surface;
cairo_image_surface_t *image;
@ -339,11 +339,11 @@ _cairo_glitz_surface_acquire_dest_image (void *abstract_surface,
}
static void
_cairo_glitz_surface_release_dest_image (void *abstract_surface,
cairo_rectangle_t *interest_rect,
cairo_image_surface_t *image,
cairo_rectangle_t *image_rect,
void *image_extra)
_cairo_glitz_surface_release_dest_image (void *abstract_surface,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t *image,
cairo_rectangle_fixed_t *image_rect,
void *image_extra)
{
cairo_glitz_surface_t *surface = abstract_surface;
@ -918,11 +918,11 @@ _cairo_glitz_surface_composite (cairo_operator_t op,
}
static cairo_int_status_t
_cairo_glitz_surface_fill_rectangles (void *abstract_dst,
cairo_operator_t op,
const cairo_color_t *color,
cairo_rectangle_t *rects,
int n_rects)
_cairo_glitz_surface_fill_rectangles (void *abstract_dst,
cairo_operator_t op,
const cairo_color_t *color,
cairo_rectangle_fixed_t *rects,
int n_rects)
{
cairo_glitz_surface_t *dst = abstract_dst;
@ -1256,8 +1256,8 @@ _cairo_glitz_surface_set_clip_region (void *abstract_surface,
}
static cairo_int_status_t
_cairo_glitz_surface_get_extents (void *abstract_surface,
cairo_rectangle_t *rectangle)
_cairo_glitz_surface_get_extents (void *abstract_surface,
cairo_rectangle_fixed_t *rectangle)
{
cairo_glitz_surface_t *surface = abstract_surface;

View file

@ -962,19 +962,19 @@ BAIL:
/* 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_t is
* corners, expressed in fixed point numbers. A cairo_rectangle_fixed_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_t by
* This function converts a cairo_box_t to a cairo_rectangle_fixed_t by
* increasing the area to the nearest integer coordinates. We should
* standardize on cairo_rectangle_t and cairo_rectangle_fixed_t, and
* standardize on cairo_rectangle_fixed_t and cairo_rectangle_fixed_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_t *rectangle)
_cairo_box_round_to_rectangle (cairo_box_t *box, cairo_rectangle_fixed_t *rectangle)
{
rectangle->x = _cairo_fixed_integer_floor (box->p1.x);
rectangle->y = _cairo_fixed_integer_floor (box->p1.y);
@ -983,7 +983,7 @@ _cairo_box_round_to_rectangle (cairo_box_t *box, cairo_rectangle_t *rectangle)
}
void
_cairo_rectangle_intersect (cairo_rectangle_t *dest, cairo_rectangle_t *src)
_cairo_rectangle_intersect (cairo_rectangle_fixed_t *dest, cairo_rectangle_fixed_t *src)
{
int x1, y1, x2, y2;

View file

@ -458,9 +458,9 @@ _cairo_image_surface_release_source_image (void *abstract_surf
static cairo_status_t
_cairo_image_surface_acquire_dest_image (void *abstract_surface,
cairo_rectangle_t *interest_rect,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_t *image_rect_out,
cairo_rectangle_fixed_t *image_rect_out,
void **image_extra)
{
cairo_image_surface_t *surface = abstract_surface;
@ -477,11 +477,11 @@ _cairo_image_surface_acquire_dest_image (void *abstract_surfa
}
static void
_cairo_image_surface_release_dest_image (void *abstract_surface,
cairo_rectangle_t *interest_rect,
cairo_image_surface_t *image,
cairo_rectangle_t *image_rect,
void *image_extra)
_cairo_image_surface_release_dest_image (void *abstract_surface,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t *image,
cairo_rectangle_fixed_t *image_rect,
void *image_extra)
{
}
@ -704,11 +704,11 @@ _cairo_image_surface_composite (cairo_operator_t op,
}
static cairo_int_status_t
_cairo_image_surface_fill_rectangles (void *abstract_surface,
cairo_operator_t op,
const cairo_color_t *color,
cairo_rectangle_t *rects,
int num_rects)
_cairo_image_surface_fill_rectangles (void *abstract_surface,
cairo_operator_t op,
const cairo_color_t *color,
cairo_rectangle_fixed_t *rects,
int num_rects)
{
cairo_image_surface_t *surface = abstract_surface;
@ -879,8 +879,8 @@ _cairo_image_surface_set_clip_region (void *abstract_surface,
}
static cairo_int_status_t
_cairo_image_surface_get_extents (void *abstract_surface,
cairo_rectangle_t *rectangle)
_cairo_image_surface_get_extents (void *abstract_surface,
cairo_rectangle_fixed_t *rectangle)
{
cairo_image_surface_t *surface = abstract_surface;

View file

@ -544,8 +544,8 @@ _cairo_meta_surface_intersect_clip_path (void *dst,
* added to it.
*/
static cairo_int_status_t
_cairo_meta_surface_get_extents (void *abstract_surface,
cairo_rectangle_t *rectangle)
_cairo_meta_surface_get_extents (void *abstract_surface,
cairo_rectangle_fixed_t *rectangle)
{
rectangle->x = 0;
rectangle->y = 0;

View file

@ -169,7 +169,7 @@ _cairo_paginated_surface_acquire_source_image (void *abstract_surface,
{
cairo_paginated_surface_t *surface = abstract_surface;
cairo_surface_t *image;
cairo_rectangle_t extents;
cairo_rectangle_fixed_t extents;
_cairo_surface_get_extents (surface->target, &extents);
@ -315,8 +315,8 @@ _cairo_paginated_surface_intersect_clip_path (void *abstract_surface,
}
static cairo_int_status_t
_cairo_paginated_surface_get_extents (void *abstract_surface,
cairo_rectangle_t *rectangle)
_cairo_paginated_surface_get_extents (void *abstract_surface,
cairo_rectangle_fixed_t *rectangle)
{
cairo_paginated_surface_t *surface = abstract_surface;
@ -447,7 +447,7 @@ _cairo_paginated_surface_snapshot (void *abstract_other)
#if 0
return _cairo_surface_snapshot (other->meta);
#else
cairo_rectangle_t extents;
cairo_rectangle_fixed_t extents;
cairo_surface_t *surface;
_cairo_surface_get_extents (other->target, &extents);

View file

@ -1394,14 +1394,14 @@ _cairo_pattern_acquire_surfaces (cairo_pattern_t *src,
* with a little more work.
**/
cairo_status_t
_cairo_pattern_get_extents (cairo_pattern_t *pattern,
cairo_rectangle_t *extents)
_cairo_pattern_get_extents (cairo_pattern_t *pattern,
cairo_rectangle_fixed_t *extents)
{
if (pattern->extend == CAIRO_EXTEND_NONE &&
pattern->type == CAIRO_PATTERN_TYPE_SURFACE)
{
cairo_status_t status;
cairo_rectangle_t surface_extents;
cairo_rectangle_fixed_t surface_extents;
cairo_surface_pattern_t *surface_pattern =
(cairo_surface_pattern_t *) pattern;
cairo_surface_t *surface = surface_pattern->surface;

View file

@ -886,7 +886,7 @@ emit_surface_pattern (cairo_pdf_surface_t *dst,
cairo_matrix_t cairo_p2d, pdf_p2d;
cairo_extend_t extend = cairo_pattern_get_extend (&pattern->base);
int xstep, ystep;
cairo_rectangle_t dst_extents;
cairo_rectangle_fixed_t dst_extents;
/* XXX: Should do something clever here for PDF source surfaces ? */
@ -1384,8 +1384,8 @@ _cairo_pdf_surface_show_page (void *abstract_surface)
}
static cairo_int_status_t
_cairo_pdf_surface_get_extents (void *abstract_surface,
cairo_rectangle_t *rectangle)
_cairo_pdf_surface_get_extents (void *abstract_surface,
cairo_rectangle_fixed_t *rectangle)
{
cairo_pdf_surface_t *surface = abstract_surface;

View file

@ -1575,7 +1575,7 @@ static void
emit_surface_pattern (cairo_ps_surface_t *surface,
cairo_surface_pattern_t *pattern)
{
cairo_rectangle_t extents;
cairo_rectangle_fixed_t extents;
if (_cairo_surface_is_meta (pattern->surface)) {
_cairo_output_stream_printf (surface->stream, "/MyPattern {\n");
@ -1702,8 +1702,8 @@ _cairo_ps_surface_intersect_clip_path (void *abstract_surface,
}
static cairo_int_status_t
_cairo_ps_surface_get_extents (void *abstract_surface,
cairo_rectangle_t *rectangle)
_cairo_ps_surface_get_extents (void *abstract_surface,
cairo_rectangle_fixed_t *rectangle)
{
cairo_ps_surface_t *surface = abstract_surface;

View file

@ -46,7 +46,7 @@ typedef struct cairo_quartz_surface {
cairo_bool_t y_grows_down;
cairo_rectangle_t extents;
cairo_rectangle_fixed_t extents;
pixman_region16_t *clip_region;
} cairo_quartz_surface_t;

View file

@ -63,12 +63,11 @@ _cairo_quartz_surface_acquire_source_image(void *abstract_surface,
}
static cairo_status_t
_cairo_quartz_surface_acquire_dest_image(void *abstract_surface,
cairo_rectangle_t * interest_rect,
cairo_image_surface_t **
image_out,
cairo_rectangle_t * image_rect,
void **image_extra)
_cairo_quartz_surface_acquire_dest_image(void *abstract_surface,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_fixed_t *image_rect,
void **image_extra)
{
cairo_quartz_surface_t *surface = abstract_surface;
cairo_surface_t *image_surface;
@ -146,12 +145,11 @@ create_image_from_surface (cairo_image_surface_t *image_surface, void *data)
}
static void
_cairo_quartz_surface_release_dest_image(void *abstract_surface,
cairo_rectangle_t *
intersect_rect,
cairo_image_surface_t * image,
cairo_rectangle_t * image_rect,
void *image_extra)
_cairo_quartz_surface_release_dest_image(void *abstract_surface,
cairo_rectangle_fixed_t *intersect_rect,
cairo_image_surface_t *image,
cairo_rectangle_fixed_t *image_rect,
void *image_extra)
{
cairo_quartz_surface_t *surface = abstract_surface;
CGImageRef image_ref;
@ -197,8 +195,8 @@ _cairo_quartz_surface_set_clip_region(void *abstract_surface,
}
static cairo_int_status_t
_cairo_quartz_surface_get_extents (void *abstract_surface,
cairo_rectangle_t * rectangle)
_cairo_quartz_surface_get_extents (void *abstract_surface,
cairo_rectangle_fixed_t *rectangle)
{
cairo_quartz_surface_t *surface = abstract_surface;

View file

@ -37,7 +37,7 @@
/**
* _cairo_region_create_from_rectangle:
* @rect: a #cairo_rectangle_t
* @rect: a #cairo_rectangle_fixed_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_t *rect)
_cairo_region_create_from_rectangle (cairo_rectangle_fixed_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 (cairo_rectangle_t *rect)
* @region: a #pixman_region16_t
* @rect: rectangle into which to store the extents
*
* Gets the bounding box of a region as a cairo_rectangle_t
* Gets the bounding box of a region as a cairo_rectangle_fixed_t
**/
void
_cairo_region_extents_rectangle (pixman_region16_t *region,
cairo_rectangle_t *rect)
_cairo_region_extents_rectangle (pixman_region16_t *region,
cairo_rectangle_fixed_t *rect)
{
pixman_box16_t *region_extents = pixman_region_extents (region);

View file

@ -782,10 +782,10 @@ _cairo_scaled_font_text_to_glyphs (cairo_scaled_font_t *scaled_font,
* Compute a device-space bounding box for the glyphs.
*/
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_t *extents)
_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_status_t status = CAIRO_STATUS_SUCCESS;
int i;

View file

@ -96,10 +96,10 @@ _cairo_surface_fallback_composite (cairo_operator_t op,
unsigned int height);
cairo_private cairo_status_t
_cairo_surface_fallback_fill_rectangles (cairo_surface_t *surface,
_cairo_surface_fallback_fill_rectangles (cairo_surface_t *surface,
cairo_operator_t op,
const cairo_color_t *color,
cairo_rectangle_t *rects,
const cairo_color_t *color,
cairo_rectangle_fixed_t *rects,
int num_rects);
cairo_private cairo_status_t

View file

@ -40,9 +40,9 @@
typedef struct {
cairo_surface_t *dst;
cairo_rectangle_t extents;
cairo_rectangle_fixed_t extents;
cairo_image_surface_t *image;
cairo_rectangle_t image_rect;
cairo_rectangle_fixed_t image_rect;
void *image_extra;
} fallback_state_t;
@ -98,21 +98,21 @@ _fallback_fini (fallback_state_t *state)
state->image_extra);
}
typedef cairo_status_t (*cairo_draw_func_t) (void *closure,
cairo_operator_t op,
cairo_pattern_t *src,
cairo_surface_t *dst,
int dst_x,
int dst_y,
const cairo_rectangle_t *extents);
typedef cairo_status_t (*cairo_draw_func_t) (void *closure,
cairo_operator_t op,
cairo_pattern_t *src,
cairo_surface_t *dst,
int dst_x,
int dst_y,
const cairo_rectangle_fixed_t *extents);
static cairo_status_t
_create_composite_mask_pattern (cairo_surface_pattern_t *mask_pattern,
cairo_clip_t *clip,
cairo_draw_func_t draw_func,
void *draw_closure,
cairo_surface_t *dst,
const cairo_rectangle_t *extents)
_create_composite_mask_pattern (cairo_surface_pattern_t *mask_pattern,
cairo_clip_t *clip,
cairo_draw_func_t draw_func,
void *draw_closure,
cairo_surface_t *dst,
const cairo_rectangle_fixed_t *extents)
{
cairo_surface_t *mask;
cairo_status_t status;
@ -151,13 +151,13 @@ _create_composite_mask_pattern (cairo_surface_pattern_t *mask_pattern,
* us to combine the clip with the mask
*/
static cairo_status_t
_clip_and_composite_with_mask (cairo_clip_t *clip,
cairo_operator_t op,
cairo_pattern_t *src,
cairo_draw_func_t draw_func,
void *draw_closure,
cairo_surface_t *dst,
const cairo_rectangle_t *extents)
_clip_and_composite_with_mask (cairo_clip_t *clip,
cairo_operator_t op,
cairo_pattern_t *src,
cairo_draw_func_t draw_func,
void *draw_closure,
cairo_surface_t *dst,
const cairo_rectangle_fixed_t *extents)
{
cairo_surface_pattern_t mask_pattern;
cairo_status_t status;
@ -185,13 +185,13 @@ _clip_and_composite_with_mask (cairo_clip_t *clip,
* in two pieces and combine them together.
*/
static cairo_status_t
_clip_and_composite_combine (cairo_clip_t *clip,
cairo_operator_t op,
cairo_pattern_t *src,
cairo_draw_func_t draw_func,
void *draw_closure,
cairo_surface_t *dst,
const cairo_rectangle_t *extents)
_clip_and_composite_combine (cairo_clip_t *clip,
cairo_operator_t op,
cairo_pattern_t *src,
cairo_draw_func_t draw_func,
void *draw_closure,
cairo_surface_t *dst,
const cairo_rectangle_fixed_t *extents)
{
cairo_surface_t *intermediate;
cairo_surface_pattern_t dst_pattern;
@ -274,12 +274,12 @@ _clip_and_composite_combine (cairo_clip_t *clip,
* defined as (src IN mask IN clip) ADD (dst OUT (mask IN clip))
*/
static cairo_status_t
_clip_and_composite_source (cairo_clip_t *clip,
cairo_pattern_t *src,
cairo_draw_func_t draw_func,
void *draw_closure,
cairo_surface_t *dst,
const cairo_rectangle_t *extents)
_clip_and_composite_source (cairo_clip_t *clip,
cairo_pattern_t *src,
cairo_draw_func_t draw_func,
void *draw_closure,
cairo_surface_t *dst,
const cairo_rectangle_fixed_t *extents)
{
cairo_surface_pattern_t mask_pattern;
cairo_status_t status;
@ -320,7 +320,7 @@ _clip_and_composite_source (cairo_clip_t *clip,
}
static int
_cairo_rectangle_empty (const cairo_rectangle_t *rect)
_cairo_rectangle_empty (const cairo_rectangle_fixed_t *rect)
{
return rect->width == 0 || rect->height == 0;
}
@ -347,13 +347,13 @@ _cairo_rectangle_empty (const cairo_rectangle_t *rect)
* Return value: %CAIRO_STATUS_SUCCESS if the drawing succeeded.
**/
static cairo_status_t
_clip_and_composite (cairo_clip_t *clip,
cairo_operator_t op,
cairo_pattern_t *src,
cairo_draw_func_t draw_func,
void *draw_closure,
cairo_surface_t *dst,
const cairo_rectangle_t *extents)
_clip_and_composite (cairo_clip_t *clip,
cairo_operator_t op,
cairo_pattern_t *src,
cairo_draw_func_t draw_func,
void *draw_closure,
cairo_surface_t *dst,
const cairo_rectangle_fixed_t *extents)
{
cairo_pattern_union_t solid_pattern;
cairo_status_t status;
@ -403,12 +403,12 @@ _clip_and_composite (cairo_clip_t *clip,
/* Composites a region representing a set of trapezoids.
*/
static cairo_status_t
_composite_trap_region (cairo_clip_t *clip,
cairo_pattern_t *src,
cairo_operator_t op,
cairo_surface_t *dst,
pixman_region16_t *trap_region,
cairo_rectangle_t *extents)
_composite_trap_region (cairo_clip_t *clip,
cairo_pattern_t *src,
cairo_operator_t op,
cairo_surface_t *dst,
pixman_region16_t *trap_region,
cairo_rectangle_fixed_t *extents)
{
cairo_status_t status;
cairo_pattern_union_t solid_pattern;
@ -470,13 +470,13 @@ typedef struct {
} cairo_composite_traps_info_t;
static cairo_status_t
_composite_traps_draw_func (void *closure,
cairo_operator_t op,
cairo_pattern_t *src,
cairo_surface_t *dst,
int dst_x,
int dst_y,
const cairo_rectangle_t *extents)
_composite_traps_draw_func (void *closure,
cairo_operator_t op,
cairo_pattern_t *src,
cairo_surface_t *dst,
int dst_x,
int dst_y,
const cairo_rectangle_fixed_t *extents)
{
cairo_composite_traps_info_t *info = closure;
cairo_pattern_union_t pattern;
@ -513,7 +513,7 @@ _clip_and_composite_trapezoids (cairo_pattern_t *src,
cairo_status_t status;
pixman_region16_t *trap_region;
pixman_region16_t *clear_region = NULL;
cairo_rectangle_t extents;
cairo_rectangle_fixed_t extents;
cairo_composite_traps_info_t traps_info;
if (traps->num_traps == 0)
@ -656,7 +656,7 @@ _cairo_surface_fallback_paint (cairo_surface_t *surface,
cairo_pattern_t *source)
{
cairo_status_t status;
cairo_rectangle_t extents;
cairo_rectangle_fixed_t extents;
cairo_box_t box;
cairo_traps_t traps;
@ -665,7 +665,7 @@ _cairo_surface_fallback_paint (cairo_surface_t *surface,
return status;
if (_cairo_operator_bounded_by_source (op)) {
cairo_rectangle_t source_extents;
cairo_rectangle_fixed_t source_extents;
status = _cairo_pattern_get_extents (source, &source_extents);
if (status)
return status;
@ -699,13 +699,13 @@ _cairo_surface_fallback_paint (cairo_surface_t *surface,
}
static cairo_status_t
_cairo_surface_mask_draw_func (void *closure,
cairo_operator_t op,
cairo_pattern_t *src,
cairo_surface_t *dst,
int dst_x,
int dst_y,
const cairo_rectangle_t *extents)
_cairo_surface_mask_draw_func (void *closure,
cairo_operator_t op,
cairo_pattern_t *src,
cairo_surface_t *dst,
int dst_x,
int dst_y,
const cairo_rectangle_fixed_t *extents)
{
cairo_pattern_t *mask = closure;
@ -732,7 +732,7 @@ _cairo_surface_fallback_mask (cairo_surface_t *surface,
cairo_pattern_t *mask)
{
cairo_status_t status;
cairo_rectangle_t extents, source_extents, mask_extents;
cairo_rectangle_fixed_t extents, source_extents, mask_extents;
status = _cairo_surface_get_extents (surface, &extents);
if (status)
@ -848,13 +848,13 @@ typedef struct {
} cairo_show_glyphs_info_t;
static cairo_status_t
_cairo_surface_old_show_glyphs_draw_func (void *closure,
cairo_operator_t op,
cairo_pattern_t *src,
cairo_surface_t *dst,
int dst_x,
int dst_y,
const cairo_rectangle_t *extents)
_cairo_surface_old_show_glyphs_draw_func (void *closure,
cairo_operator_t op,
cairo_pattern_t *src,
cairo_surface_t *dst,
int dst_x,
int dst_y,
const cairo_rectangle_fixed_t *extents)
{
cairo_show_glyphs_info_t *glyph_info = closure;
cairo_pattern_union_t pattern;
@ -916,7 +916,7 @@ _cairo_surface_fallback_show_glyphs (cairo_surface_t *surface,
cairo_scaled_font_t *scaled_font)
{
cairo_status_t status;
cairo_rectangle_t extents, glyph_extents;
cairo_rectangle_fixed_t extents, glyph_extents;
cairo_show_glyphs_info_t glyph_info;
status = _cairo_surface_get_extents (surface, &extents);
@ -1039,14 +1039,14 @@ _cairo_surface_fallback_composite (cairo_operator_t op,
}
cairo_status_t
_cairo_surface_fallback_fill_rectangles (cairo_surface_t *surface,
cairo_operator_t op,
const cairo_color_t *color,
cairo_rectangle_t *rects,
int num_rects)
_cairo_surface_fallback_fill_rectangles (cairo_surface_t *surface,
cairo_operator_t op,
const cairo_color_t *color,
cairo_rectangle_fixed_t *rects,
int num_rects)
{
fallback_state_t state;
cairo_rectangle_t *offset_rects = NULL;
cairo_rectangle_fixed_t *offset_rects = NULL;
cairo_status_t status;
int x1, y1, x2, y2;
int i;
@ -1086,7 +1086,7 @@ _cairo_surface_fallback_fill_rectangles (cairo_surface_t *surface,
/* 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_t) * num_rects);
offset_rects = malloc (sizeof (cairo_rectangle_fixed_t) * num_rects);
if (offset_rects == NULL) {
status = CAIRO_STATUS_NO_MEMORY;
goto DONE;

View file

@ -714,9 +714,9 @@ _cairo_surface_release_source_image (cairo_surface_t *surface,
**/
cairo_status_t
_cairo_surface_acquire_dest_image (cairo_surface_t *surface,
cairo_rectangle_t *interest_rect,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_t *image_rect,
cairo_rectangle_fixed_t *image_rect,
void **image_extra)
{
assert (!surface->finished);
@ -739,11 +739,11 @@ _cairo_surface_acquire_dest_image (cairo_surface_t *surface,
* resources that were allocated.
**/
void
_cairo_surface_release_dest_image (cairo_surface_t *surface,
cairo_rectangle_t *interest_rect,
cairo_image_surface_t *image,
cairo_rectangle_t *image_rect,
void *image_extra)
_cairo_surface_release_dest_image (cairo_surface_t *surface,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t *image,
cairo_rectangle_fixed_t *image_rect,
void *image_extra)
{
assert (!surface->finished);
@ -915,7 +915,7 @@ _cairo_surface_fill_rectangle (cairo_surface_t *surface,
int width,
int height)
{
cairo_rectangle_t rect;
cairo_rectangle_fixed_t rect;
assert (! surface->is_snapshot);
@ -954,7 +954,7 @@ _cairo_surface_fill_region (cairo_surface_t *surface,
{
int num_rects = pixman_region_num_rects (region);
pixman_box16_t *boxes = pixman_region_rects (region);
cairo_rectangle_t *rects;
cairo_rectangle_fixed_t *rects;
cairo_status_t status;
int i;
@ -1000,10 +1000,10 @@ _cairo_surface_fill_region (cairo_surface_t *surface,
**/
cairo_status_t
_cairo_surface_fill_rectangles (cairo_surface_t *surface,
cairo_operator_t op,
cairo_operator_t op,
const cairo_color_t *color,
cairo_rectangle_t *rects,
int num_rects)
cairo_rectangle_fixed_t *rects,
int num_rects)
{
cairo_int_status_t status;
@ -1529,8 +1529,8 @@ _cairo_surface_set_clip (cairo_surface_t *surface, cairo_clip_t *clip)
*/
cairo_status_t
_cairo_surface_get_extents (cairo_surface_t *surface,
cairo_rectangle_t *rectangle)
_cairo_surface_get_extents (cairo_surface_t *surface,
cairo_rectangle_fixed_t *rectangle)
{
cairo_status_t status;
@ -1646,16 +1646,16 @@ _cairo_surface_old_show_glyphs (cairo_scaled_font_t *scaled_font,
}
static cairo_status_t
_cairo_surface_composite_fixup_unbounded_internal (cairo_surface_t *dst,
cairo_rectangle_t *src_rectangle,
cairo_rectangle_t *mask_rectangle,
int dst_x,
int dst_y,
unsigned int width,
unsigned int height)
_cairo_surface_composite_fixup_unbounded_internal (cairo_surface_t *dst,
cairo_rectangle_fixed_t *src_rectangle,
cairo_rectangle_fixed_t *mask_rectangle,
int dst_x,
int dst_y,
unsigned int width,
unsigned int height)
{
cairo_rectangle_t dst_rectangle;
cairo_rectangle_t drawn_rectangle;
cairo_rectangle_fixed_t dst_rectangle;
cairo_rectangle_fixed_t drawn_rectangle;
pixman_region16_t *drawn_region;
pixman_region16_t *clear_region;
cairo_status_t status = CAIRO_STATUS_SUCCESS;
@ -1744,9 +1744,9 @@ _cairo_surface_composite_fixup_unbounded (cairo_surface_t *dst,
unsigned int width,
unsigned int height)
{
cairo_rectangle_t src_tmp, mask_tmp;
cairo_rectangle_t *src_rectangle = NULL;
cairo_rectangle_t *mask_rectangle = NULL;
cairo_rectangle_fixed_t src_tmp, mask_tmp;
cairo_rectangle_fixed_t *src_rectangle = NULL;
cairo_rectangle_fixed_t *mask_rectangle = NULL;
assert (! dst->is_snapshot);
@ -1819,9 +1819,9 @@ _cairo_surface_composite_shape_fixup_unbounded (cairo_surface_t *dst,
unsigned int width,
unsigned int height)
{
cairo_rectangle_t src_tmp, mask_tmp;
cairo_rectangle_t *src_rectangle = NULL;
cairo_rectangle_t *mask_rectangle = NULL;
cairo_rectangle_fixed_t src_tmp, mask_tmp;
cairo_rectangle_fixed_t *src_rectangle = NULL;
cairo_rectangle_fixed_t *mask_rectangle = NULL;
assert (! dst->is_snapshot);

View file

@ -1230,8 +1230,8 @@ _cairo_svg_surface_fill (void *abstract_surface,
}
static cairo_int_status_t
_cairo_svg_surface_get_extents (void *abstract_surface,
cairo_rectangle_t *rectangle)
_cairo_svg_surface_get_extents (void *abstract_surface,
cairo_rectangle_fixed_t *rectangle)
{
cairo_svg_surface_t *surface = abstract_surface;

View file

@ -68,11 +68,11 @@ typedef struct _cairo_win32_surface {
cairo_surface_t *image;
cairo_rectangle_t clip_rect;
cairo_rectangle_fixed_t clip_rect;
HRGN saved_clip;
cairo_rectangle_t extents;
cairo_rectangle_fixed_t extents;
} cairo_win32_surface_t;
cairo_status_t

View file

@ -431,9 +431,9 @@ _cairo_win32_surface_release_source_image (void *abstract_surf
static cairo_status_t
_cairo_win32_surface_acquire_dest_image (void *abstract_surface,
cairo_rectangle_t *interest_rect,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_t *image_rect,
cairo_rectangle_fixed_t *image_rect,
void **image_extra)
{
cairo_win32_surface_t *surface = abstract_surface;
@ -496,11 +496,11 @@ _cairo_win32_surface_acquire_dest_image (void *abstract_surfa
}
static void
_cairo_win32_surface_release_dest_image (void *abstract_surface,
cairo_rectangle_t *interest_rect,
cairo_image_surface_t *image,
cairo_rectangle_t *image_rect,
void *image_extra)
_cairo_win32_surface_release_dest_image (void *abstract_surface,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t *image,
cairo_rectangle_fixed_t *image_rect,
void *image_extra)
{
cairo_win32_surface_t *surface = abstract_surface;
cairo_win32_surface_t *local = image_extra;
@ -794,7 +794,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_t *rects,
cairo_rectangle_fixed_t *rects,
int num_rects)
{
cairo_win32_surface_t *surface = abstract_surface;
@ -945,8 +945,8 @@ _cairo_win32_surface_set_clip_region (void *abstract_surface,
}
static cairo_int_status_t
_cairo_win32_surface_get_extents (void *abstract_surface,
cairo_rectangle_t *rectangle)
_cairo_win32_surface_get_extents (void *abstract_surface,
cairo_rectangle_fixed_t *rectangle)
{
cairo_win32_surface_t *surface = abstract_surface;

View file

@ -351,10 +351,10 @@ _CAIRO_MASK_FORMAT (cairo_format_masks_t *masks, cairo_format_t *format)
}
static cairo_status_t
_get_image_surface (cairo_xcb_surface_t *surface,
cairo_rectangle_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_t *image_rect)
_get_image_surface (cairo_xcb_surface_t *surface,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_fixed_t *image_rect)
{
cairo_image_surface_t *image;
XCBGetImageRep *imagerep;
@ -370,7 +370,7 @@ _get_image_surface (cairo_xcb_surface_t *surface,
y2 = surface->height;
if (interest_rect) {
cairo_rectangle_t rect;
cairo_rectangle_fixed_t rect;
rect.x = interest_rect->x;
rect.y = interest_rect->y;
@ -597,9 +597,9 @@ _cairo_xcb_surface_release_source_image (void *abstract_surfac
static cairo_status_t
_cairo_xcb_surface_acquire_dest_image (void *abstract_surface,
cairo_rectangle_t *interest_rect,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_t *image_rect_out,
cairo_rectangle_fixed_t *image_rect_out,
void **image_extra)
{
cairo_xcb_surface_t *surface = abstract_surface;
@ -618,9 +618,9 @@ _cairo_xcb_surface_acquire_dest_image (void *abstract_surface
static void
_cairo_xcb_surface_release_dest_image (void *abstract_surface,
cairo_rectangle_t *interest_rect,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t *image,
cairo_rectangle_t *image_rect,
cairo_rectangle_fixed_t *image_rect,
void *image_extra)
{
cairo_xcb_surface_t *surface = abstract_surface;
@ -914,11 +914,11 @@ _cairo_xcb_surface_composite (cairo_operator_t op,
}
static cairo_int_status_t
_cairo_xcb_surface_fill_rectangles (void *abstract_surface,
cairo_operator_t op,
const cairo_color_t *color,
cairo_rectangle_t *rects,
int num_rects)
_cairo_xcb_surface_fill_rectangles (void *abstract_surface,
cairo_operator_t op,
const cairo_color_t * color,
cairo_rectangle_fixed_t *rects,
int num_rects)
{
cairo_xcb_surface_t *surface = abstract_surface;
XCBRenderCOLOR render_color;
@ -1010,8 +1010,8 @@ _cairo_xcb_surface_composite_trapezoids (cairo_operator_t op,
}
static cairo_int_status_t
_cairo_xcb_surface_get_extents (void *abstract_surface,
cairo_rectangle_t *rectangle)
_cairo_xcb_surface_get_extents (void *abstract_surface,
cairo_rectangle_fixed_t *rectangle)
{
cairo_xcb_surface_t *surface = abstract_surface;

View file

@ -429,10 +429,10 @@ _swap_ximage_to_native (XImage *ximage)
}
static cairo_status_t
_get_image_surface (cairo_xlib_surface_t *surface,
cairo_rectangle_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_t *image_rect)
_get_image_surface (cairo_xlib_surface_t *surface,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_fixed_t *image_rect)
{
cairo_image_surface_t *image;
XImage *ximage;
@ -446,7 +446,7 @@ _get_image_surface (cairo_xlib_surface_t *surface,
y2 = surface->height;
if (interest_rect) {
cairo_rectangle_t rect;
cairo_rectangle_fixed_t rect;
rect.x = interest_rect->x;
rect.y = interest_rect->y;
@ -736,9 +736,9 @@ _cairo_xlib_surface_release_source_image (void *abstract_surfa
static cairo_status_t
_cairo_xlib_surface_acquire_dest_image (void *abstract_surface,
cairo_rectangle_t *interest_rect,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_t *image_rect_out,
cairo_rectangle_fixed_t *image_rect_out,
void **image_extra)
{
cairo_xlib_surface_t *surface = abstract_surface;
@ -756,11 +756,11 @@ _cairo_xlib_surface_acquire_dest_image (void *abstract_surfac
}
static void
_cairo_xlib_surface_release_dest_image (void *abstract_surface,
cairo_rectangle_t *interest_rect,
cairo_image_surface_t *image,
cairo_rectangle_t *image_rect,
void *image_extra)
_cairo_xlib_surface_release_dest_image (void *abstract_surface,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t *image,
cairo_rectangle_fixed_t *image_rect,
void *image_extra)
{
cairo_xlib_surface_t *surface = abstract_surface;
@ -1324,11 +1324,11 @@ _cairo_xlib_surface_composite (cairo_operator_t op,
}
static cairo_int_status_t
_cairo_xlib_surface_fill_rectangles (void *abstract_surface,
cairo_operator_t op,
const cairo_color_t *color,
cairo_rectangle_t *rects,
int num_rects)
_cairo_xlib_surface_fill_rectangles (void *abstract_surface,
cairo_operator_t op,
const cairo_color_t *color,
cairo_rectangle_fixed_t *rects,
int num_rects)
{
cairo_xlib_surface_t *surface = abstract_surface;
XRenderColor render_color;
@ -1628,8 +1628,8 @@ _cairo_xlib_surface_set_clip_region (void *abstract_surface,
}
static cairo_int_status_t
_cairo_xlib_surface_get_extents (void *abstract_surface,
cairo_rectangle_t *rectangle)
_cairo_xlib_surface_get_extents (void *abstract_surface,
cairo_rectangle_fixed_t *rectangle)
{
cairo_xlib_surface_t *surface = abstract_surface;
@ -2536,7 +2536,7 @@ _cairo_xlib_surface_old_show_glyphs (cairo_scaled_font_t *scaled_font,
}
if (status == CAIRO_STATUS_SUCCESS && !_cairo_operator_bounded_by_mask (op)) {
cairo_rectangle_t extents;
cairo_rectangle_fixed_t extents;
status = _cairo_scaled_font_glyph_device_extents (scaled_font,
glyphs,
num_glyphs,

View file

@ -367,7 +367,7 @@ void
cairo_push_group_with_content (cairo_t *cr, cairo_content_t content)
{
cairo_status_t status;
cairo_rectangle_t extents;
cairo_rectangle_fixed_t extents;
cairo_surface_t *group_surface = NULL;
/* Get the extents that we'll use in creating our new group surface */

View file

@ -248,7 +248,7 @@ typedef struct _cairo_trapezoid {
typedef struct _cairo_rectangle {
short x, y;
unsigned short width, height;
} cairo_rectangle_t, cairo_glyph_size_t;
} cairo_rectangle_fixed_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
@ -334,10 +334,10 @@ typedef struct _cairo_image_surface cairo_image_surface_t;
typedef struct _cairo_surface_backend cairo_surface_backend_t;
cairo_private void
_cairo_box_round_to_rectangle (cairo_box_t *box, cairo_rectangle_t *rectangle);
_cairo_box_round_to_rectangle (cairo_box_t *box, cairo_rectangle_fixed_t *rectangle);
cairo_private void
_cairo_rectangle_intersect (cairo_rectangle_t *dest, cairo_rectangle_t *src);
_cairo_rectangle_intersect (cairo_rectangle_fixed_t *dest, cairo_rectangle_fixed_t *src);
/* cairo_array.c structures and functions */
@ -639,18 +639,18 @@ struct _cairo_surface_backend {
void *image_extra);
cairo_status_t
(*acquire_dest_image) (void *abstract_surface,
cairo_rectangle_t *interest_rect,
(*acquire_dest_image) (void *abstract_surface,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_t *image_rect,
cairo_rectangle_fixed_t *image_rect,
void **image_extra);
void
(*release_dest_image) (void *abstract_surface,
cairo_rectangle_t *interest_rect,
cairo_image_surface_t *image,
cairo_rectangle_t *image_rect,
void *image_extra);
(*release_dest_image) (void *abstract_surface,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t *image,
cairo_rectangle_fixed_t *image_rect,
void *image_extra);
cairo_status_t
(*clone_similar) (void *surface,
@ -673,11 +673,11 @@ struct _cairo_surface_backend {
unsigned int height);
cairo_int_status_t
(*fill_rectangles) (void *surface,
cairo_operator_t op,
const cairo_color_t *color,
cairo_rectangle_t *rects,
int num_rects);
(*fill_rectangles) (void *surface,
cairo_operator_t op,
const cairo_color_t *color,
cairo_rectangle_fixed_t *rects,
int num_rects);
/* XXX: dst should be the first argument for consistency */
cairo_int_status_t
@ -749,8 +749,8 @@ struct _cairo_surface_backend {
* clip.
*/
cairo_int_status_t
(*get_extents) (void *surface,
cairo_rectangle_t *rectangle);
(*get_extents) (void *surface,
cairo_rectangle_fixed_t *rectangle);
/*
* This is an optional entry to let the surface manage its own glyph
@ -1560,10 +1560,10 @@ _cairo_scaled_font_glyph_extents (cairo_scaled_font_t *scaled_font,
cairo_text_extents_t *extents);
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_t *extents);
_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_private cairo_status_t
_cairo_scaled_font_show_glyphs (cairo_scaled_font_t *scaled_font,
@ -1682,10 +1682,10 @@ _cairo_surface_fill_region (cairo_surface_t *surface,
cairo_private cairo_status_t
_cairo_surface_fill_rectangles (cairo_surface_t *surface,
cairo_operator_t op,
cairo_operator_t op,
const cairo_color_t *color,
cairo_rectangle_t *rects,
int num_rects);
cairo_rectangle_fixed_t *rects,
int num_rects);
cairo_private cairo_status_t
_cairo_surface_paint (cairo_surface_t *surface,
@ -1758,16 +1758,16 @@ _cairo_surface_release_source_image (cairo_surface_t *surface,
cairo_private cairo_status_t
_cairo_surface_acquire_dest_image (cairo_surface_t *surface,
cairo_rectangle_t *interest_rect,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_t *image_rect,
cairo_rectangle_fixed_t *image_rect,
void **image_extra);
cairo_private void
_cairo_surface_release_dest_image (cairo_surface_t *surface,
cairo_rectangle_t *interest_rect,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t *image,
cairo_rectangle_t *image_rect,
cairo_rectangle_fixed_t *image_rect,
void *image_extra);
cairo_private cairo_status_t
@ -1803,8 +1803,8 @@ cairo_private cairo_status_t
_cairo_surface_set_clip (cairo_surface_t *surface, cairo_clip_t *clip);
cairo_private cairo_status_t
_cairo_surface_get_extents (cairo_surface_t *surface,
cairo_rectangle_t *rectangle);
_cairo_surface_get_extents (cairo_surface_t *surface,
cairo_rectangle_fixed_t *rectangle);
cairo_private cairo_status_t
_cairo_surface_old_show_glyphs (cairo_scaled_font_t *scaled_font,
@ -2151,8 +2151,8 @@ _cairo_pattern_acquire_surfaces (cairo_pattern_t *src,
cairo_surface_attributes_t *mask_attributes);
cairo_private cairo_status_t
_cairo_pattern_get_extents (cairo_pattern_t *pattern,
cairo_rectangle_t *extents);
_cairo_pattern_get_extents (cairo_pattern_t *pattern,
cairo_rectangle_fixed_t *extents);
cairo_private cairo_status_t
_cairo_gstate_set_antialias (cairo_gstate_t *gstate,
@ -2164,11 +2164,11 @@ _cairo_gstate_get_antialias (cairo_gstate_t *gstate);
/* cairo-region.c */
cairo_private pixman_region16_t *
_cairo_region_create_from_rectangle (cairo_rectangle_t *rect);
_cairo_region_create_from_rectangle (cairo_rectangle_fixed_t *rect);
cairo_private void
_cairo_region_extents_rectangle (pixman_region16_t *region,
cairo_rectangle_t *rect);
_cairo_region_extents_rectangle (pixman_region16_t *region,
cairo_rectangle_fixed_t *rect);
/* cairo_unicode.c */

View file

@ -134,11 +134,11 @@ _test_fallback_surface_release_source_image (void *abstract_surface,
}
static cairo_status_t
_test_fallback_surface_acquire_dest_image (void *abstract_surface,
cairo_rectangle_t *interest_rect,
cairo_image_surface_t**image_out,
cairo_rectangle_t *image_rect_out,
void **image_extra)
_test_fallback_surface_acquire_dest_image (void *abstract_surface,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t **image_out,
cairo_rectangle_fixed_t *image_rect_out,
void **image_extra)
{
test_fallback_surface_t *surface = abstract_surface;
@ -150,11 +150,11 @@ _test_fallback_surface_acquire_dest_image (void *abstract_surface,
}
static void
_test_fallback_surface_release_dest_image (void *abstract_surface,
cairo_rectangle_t *interest_rect,
cairo_image_surface_t*image,
cairo_rectangle_t *image_rect,
void *image_extra)
_test_fallback_surface_release_dest_image (void *abstract_surface,
cairo_rectangle_fixed_t *interest_rect,
cairo_image_surface_t *image,
cairo_rectangle_fixed_t *image_rect,
void *image_extra)
{
test_fallback_surface_t *surface = abstract_surface;
@ -166,8 +166,8 @@ _test_fallback_surface_release_dest_image (void *abstract_surface,
}
static cairo_int_status_t
_test_fallback_surface_get_extents (void *abstract_surface,
cairo_rectangle_t *rectangle)
_test_fallback_surface_get_extents (void *abstract_surface,
cairo_rectangle_fixed_t *rectangle)
{
test_fallback_surface_t *surface = abstract_surface;

View file

@ -169,7 +169,7 @@ _test_meta_surface_intersect_clip_path (void *abstract_surface,
static cairo_int_status_t
_test_meta_surface_get_extents (void *abstract_surface,
cairo_rectangle_t *rectangle)
cairo_rectangle_fixed_t *rectangle)
{
test_meta_surface_t *surface = abstract_surface;
@ -279,7 +279,7 @@ _test_meta_surface_snapshot (void *abstract_other)
#if 0
return _cairo_surface_snapshot (other->meta);
#else
cairo_rectangle_t extents;
cairo_rectangle_fixed_t extents;
cairo_surface_t *surface;
_cairo_surface_get_extents (other->image, &extents);

View file

@ -137,8 +137,8 @@ _test_paginated_surface_set_clip_region (void *abstract_surface,
}
static cairo_int_status_t
_test_paginated_surface_get_extents (void *abstract_surface,
cairo_rectangle_t *rectangle)
_test_paginated_surface_get_extents (void *abstract_surface,
cairo_rectangle_fixed_t *rectangle)
{
test_paginated_surface_t *surface = abstract_surface;