summaryrefslogtreecommitdiff
path: root/src/cairo-surface-fallback.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-09-24 11:12:05 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2008-09-24 11:45:13 +0100
commitc36a242303c99f59ba210d6c0dae831b2efb83fc (patch)
tree804ee122426c0005ade25e478822efa786c0565c /src/cairo-surface-fallback.c
parent49b9a21e0bfeed5a1e2f33162a7b1c9e67de1d75 (diff)
[traps] Replace open-coding of box->rectangle->box
Use the utility functions _cairo_box_from_rectangle and _cairo_box_round_to_rectangle() instead of open-coding. Simultaneously tweak the whitespace so that all users of traps look similar.
Diffstat (limited to 'src/cairo-surface-fallback.c')
-rw-r--r--src/cairo-surface-fallback.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/cairo-surface-fallback.c b/src/cairo-surface-fallback.c
index c7c7b11f..dc96a041 100644
--- a/src/cairo-surface-fallback.c
+++ b/src/cairo-surface-fallback.c
@@ -697,10 +697,7 @@ _cairo_surface_fallback_paint (cairo_surface_t *surface,
if (status)
return status;
- box.p1.x = _cairo_fixed_from_int (extents.x);
- box.p1.y = _cairo_fixed_from_int (extents.y);
- box.p2.x = _cairo_fixed_from_int (extents.x + extents.width);
- box.p2.y = _cairo_fixed_from_int (extents.y + extents.height);
+ _cairo_box_from_rectangle (&box, &extents);
_cairo_traps_init_box (&traps, &box);
@@ -822,10 +819,7 @@ _cairo_surface_fallback_stroke (cairo_surface_t *surface,
if (extents.width == 0 || extents.height == 0)
return CAIRO_STATUS_SUCCESS;
- box.p1.x = _cairo_fixed_from_int (extents.x);
- box.p1.y = _cairo_fixed_from_int (extents.y);
- box.p2.x = _cairo_fixed_from_int (extents.x + extents.width);
- box.p2.y = _cairo_fixed_from_int (extents.y + extents.height);
+ _cairo_box_from_rectangle (&box, &extents);
_cairo_traps_init (&traps);
_cairo_traps_limit (&traps, &box);
@@ -885,13 +879,9 @@ _cairo_surface_fallback_fill (cairo_surface_t *surface,
if (extents.width == 0 || extents.height == 0)
return CAIRO_STATUS_SUCCESS;
- box.p1.x = _cairo_fixed_from_int (extents.x);
- box.p1.y = _cairo_fixed_from_int (extents.y);
- box.p2.x = _cairo_fixed_from_int (extents.x + extents.width);
- box.p2.y = _cairo_fixed_from_int (extents.y + extents.height);
+ _cairo_box_from_rectangle (&box, &extents);
_cairo_traps_init (&traps);
-
_cairo_traps_limit (&traps, &box);
status = _cairo_path_fixed_fill_to_traps (path,