summaryrefslogtreecommitdiff
path: root/src/cairo-path-bounds.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2008-01-21 15:20:07 -0800
committerCarl Worth <cworth@cworth.org>2008-01-21 15:20:07 -0800
commit326342962daa694d876c03194e8a6c1b13f9a8d2 (patch)
treee7418aa8bee999fdab84059e57610c155b6c7c54 /src/cairo-path-bounds.c
parentc480eedbb58dd03dd4b9b87b3985758ffbce7113 (diff)
downloadcairo-326342962daa694d876c03194e8a6c1b13f9a8d2.tar.gz
Rename trailing_move_to_point to move_to_point
And prefer TRUE and FALSE literals over 1 and 0.
Diffstat (limited to 'src/cairo-path-bounds.c')
-rw-r--r--src/cairo-path-bounds.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/cairo-path-bounds.c b/src/cairo-path-bounds.c
index b945c4050..581244b49 100644
--- a/src/cairo-path-bounds.c
+++ b/src/cairo-path-bounds.c
@@ -37,9 +37,9 @@
#include "cairoint.h"
typedef struct cairo_path_bounder {
- cairo_point_t trailing_move_to_point;
- int has_trailing_move_to;
- int has_point;
+ cairo_point_t move_to_point;
+ cairo_bool_t has_move_to_point;
+ cairo_bool_t has_point;
cairo_fixed_t min_x;
cairo_fixed_t min_y;
@@ -68,13 +68,15 @@ _cairo_path_bounder_close_path (void *closure);
static void
_cairo_path_bounder_init (cairo_path_bounder_t *bounder)
{
- bounder->has_point = 0;
+ bounder->has_move_to_point = FALSE;
+ bounder->has_point = FALSE;
}
static void
_cairo_path_bounder_fini (cairo_path_bounder_t *bounder)
{
- bounder->has_point = 0;
+ bounder->has_move_to_point = FALSE;
+ bounder->has_point = FALSE;
}
static void
@@ -98,7 +100,7 @@ _cairo_path_bounder_add_point (cairo_path_bounder_t *bounder, cairo_point_t *poi
bounder->max_x = point->x;
bounder->max_y = point->y;
- bounder->has_point = 1;
+ bounder->has_point = TRUE;
}
}
@@ -107,8 +109,8 @@ _cairo_path_bounder_move_to (void *closure, cairo_point_t *point)
{
cairo_path_bounder_t *bounder = closure;
- bounder->trailing_move_to_point = *point;
- bounder->has_trailing_move_to = 1;
+ bounder->move_to_point = *point;
+ bounder->has_move_to_point = TRUE;
return CAIRO_STATUS_SUCCESS;
}
@@ -118,10 +120,10 @@ _cairo_path_bounder_line_to (void *closure, cairo_point_t *point)
{
cairo_path_bounder_t *bounder = closure;
- if (bounder->has_trailing_move_to) {
+ if (bounder->has_move_to_point) {
_cairo_path_bounder_add_point (bounder,
- &bounder->trailing_move_to_point);
- bounder->has_trailing_move_to = 0;
+ &bounder->move_to_point);
+ bounder->has_move_to_point = FALSE;
}
_cairo_path_bounder_add_point (bounder, point);