summaryrefslogtreecommitdiff
path: root/src/cairo-path-bounds.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2003-12-08 17:39:32 +0000
committerCarl Worth <cworth@cworth.org>2003-12-08 17:39:32 +0000
commit0949a86dd1cbe301c2d6ffc1aa4606d31b62cc39 (patch)
treef2f1fd16662fa1229ea239c7b3361a692390fb23 /src/cairo-path-bounds.c
parent08553e75b7db97a3176e40768231c88f9b8eeabd (diff)
downloadcairo-0949a86dd1cbe301c2d6ffc1aa4606d31b62cc39.tar.gz
Track change in cairo_path_callbacks interface.
Diffstat (limited to 'src/cairo-path-bounds.c')
-rw-r--r--src/cairo-path-bounds.c46
1 files changed, 30 insertions, 16 deletions
diff --git a/src/cairo-path-bounds.c b/src/cairo-path-bounds.c
index 40b64c3d6..ce0d83912 100644
--- a/src/cairo-path-bounds.c
+++ b/src/cairo-path-bounds.c
@@ -46,15 +46,19 @@ static cairo_status_t
_cairo_path_bounder_add_point (cairo_path_bounder_t *bounder, cairo_point_t *point);
static cairo_status_t
-_cairo_path_bounder_add_edge (void *closure, cairo_point_t *p1, cairo_point_t *p2);
+_cairo_path_bounder_move_to (void *closure, cairo_point_t *point);
static cairo_status_t
-_cairo_path_bounder_add_spline (void *closure,
- cairo_point_t *a, cairo_point_t *b,
- cairo_point_t *c, cairo_point_t *d);
+_cairo_path_bounder_line_to (void *closure, cairo_point_t *point);
static cairo_status_t
-_cairo_path_bounder_done_sub_path (void *closure, cairo_sub_path_done_t done);
+_cairo_path_bounder_curve_to (void *closure,
+ cairo_point_t *b,
+ cairo_point_t *c,
+ cairo_point_t *d);
+
+static cairo_status_t
+_cairo_path_bounder_close_path (void *closure);
static cairo_status_t
_cairo_path_bounder_done_path (void *closure);
@@ -99,24 +103,33 @@ _cairo_path_bounder_add_point (cairo_path_bounder_t *bounder, cairo_point_t *poi
}
static cairo_status_t
-_cairo_path_bounder_add_edge (void *closure, cairo_point_t *p1, cairo_point_t *p2)
+_cairo_path_bounder_move_to (void *closure, cairo_point_t *point)
+{
+ cairo_path_bounder_t *bounder = closure;
+
+ _cairo_path_bounder_add_point (bounder, point);
+
+ return CAIRO_STATUS_SUCCESS;
+}
+
+static cairo_status_t
+_cairo_path_bounder_line_to (void *closure, cairo_point_t *point)
{
cairo_path_bounder_t *bounder = closure;
- _cairo_path_bounder_add_point (bounder, p1);
- _cairo_path_bounder_add_point (bounder, p2);
+ _cairo_path_bounder_add_point (bounder, point);
return CAIRO_STATUS_SUCCESS;
}
static cairo_status_t
-_cairo_path_bounder_add_spline (void *closure,
- cairo_point_t *a, cairo_point_t *b,
- cairo_point_t *c, cairo_point_t *d)
+_cairo_path_bounder_curve_to (void *closure,
+ cairo_point_t *b,
+ cairo_point_t *c,
+ cairo_point_t *d)
{
cairo_path_bounder_t *bounder = closure;
- _cairo_path_bounder_add_point (bounder, a);
_cairo_path_bounder_add_point (bounder, b);
_cairo_path_bounder_add_point (bounder, c);
_cairo_path_bounder_add_point (bounder, d);
@@ -125,7 +138,7 @@ _cairo_path_bounder_add_spline (void *closure,
}
static cairo_status_t
-_cairo_path_bounder_done_sub_path (void *closure, cairo_sub_path_done_t done)
+_cairo_path_bounder_close_path (void *closure)
{
return CAIRO_STATUS_SUCCESS;
}
@@ -142,9 +155,10 @@ _cairo_path_bounds (cairo_path_t *path, double *x1, double *y1, double *x2, doub
{
cairo_status_t status;
static cairo_path_callbacks_t const cb = {
- _cairo_path_bounder_add_edge,
- _cairo_path_bounder_add_spline,
- _cairo_path_bounder_done_sub_path,
+ _cairo_path_bounder_move_to,
+ _cairo_path_bounder_line_to,
+ _cairo_path_bounder_curve_to,
+ _cairo_path_bounder_close_path,
_cairo_path_bounder_done_path
};