summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2005-03-23 13:52:54 +0000
committerCarl Worth <cworth@cworth.org>2005-03-23 13:52:54 +0000
commitf218c14b9da7950b49bdab76965db22ec470d5de (patch)
tree974739c1793cbeaf63388eff8957adc84c226107
parent0ba7a082afa91476129f2cbdbc48360b4f83efec (diff)
Rename cairo_path_real_t to cairo_path_fixed_t and fix all _cairo_path functions to be named as _cairo_path_fixed functions.
Track name change of cairo_path_real_t and _cairo_path_fixed functions.
-rw-r--r--ChangeLog37
-rw-r--r--src/cairo-font.c2
-rw-r--r--src/cairo-ft-font.c26
-rw-r--r--src/cairo-gstate-private.h2
-rw-r--r--src/cairo-gstate.c66
-rw-r--r--src/cairo-path-bounds.c18
-rw-r--r--src/cairo-path-fill.c20
-rw-r--r--src/cairo-path-fixed-private.h2
-rw-r--r--src/cairo-path-stroke.c34
-rw-r--r--src/cairo-path.c74
-rw-r--r--src/cairo_font.c2
-rw-r--r--src/cairo_ft_font.c26
-rw-r--r--src/cairo_gstate.c66
-rw-r--r--src/cairo_path.c74
-rw-r--r--src/cairo_path_bounds.c18
-rw-r--r--src/cairo_path_fill.c20
-rw-r--r--src/cairo_path_stroke.c34
-rw-r--r--src/cairoint.h152
18 files changed, 360 insertions, 313 deletions
diff --git a/ChangeLog b/ChangeLog
index b95612fd..f59a51fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,42 @@
2005-03-23 Carl Worth <cworth@cworth.org>
+ * src/cairo_path.c: (_cairo_path_fixed_init),
+ (_cairo_path_fixed_init_copy), (_cairo_path_fixed_fini),
+ (_cairo_path_fixed_move_to), (_cairo_path_fixed_rel_move_to),
+ (_cairo_path_fixed_line_to), (_cairo_path_fixed_rel_line_to),
+ (_cairo_path_fixed_curve_to), (_cairo_path_fixed_rel_curve_to),
+ (_cairo_path_fixed_close_path),
+ (_cairo_path_fixed_get_current_point), (_cairo_path_add),
+ (_cairo_path_add_op_buf), (_cairo_path_new_op_buf),
+ (_cairo_path_add_arg_buf), (_cairo_path_new_arg_buf),
+ (_cairo_path_fixed_interpret):
+ * src/cairo_path_bounds.c: (_cairo_path_fixed_bounds):
+ * src/cairo_path_fill.c: (_cairo_path_fixed_fill_to_traps):
+ * src/cairo_path_stroke.c: (_cairo_path_fixed_stroke_to_traps):
+ * src/cairoint.h: Rename cairo_path_real_t to cairo_path_fixed_t
+ and fix all _cairo_path functions to be named as _cairo_path_fixed
+ functions.
+
+ * src/cairo-gstate-private.h:
+ * src/cairo-path-fixed-private.h:
+ * src/cairo_font.c: (_cairo_font_glyph_path):
+ * src/cairo_ft_font.c: (_move_to), (_line_to), (_conic_to),
+ (_cubic_to), (_cairo_ft_font_glyph_path):
+ * src/cairo_gstate.c: (_cairo_gstate_init),
+ (_cairo_gstate_init_copy), (_cairo_gstate_fini),
+ (_cairo_gstate_new_path), (_cairo_gstate_move_to),
+ (_cairo_gstate_line_to), (_cairo_gstate_curve_to),
+ (_cairo_gstate_rel_move_to), (_cairo_gstate_rel_line_to),
+ (_cairo_gstate_rel_curve_to), (_cairo_gstate_close_path),
+ (_cairo_gstate_get_current_point), (_cairo_gstate_interpret_path),
+ (_cairo_gstate_stroke), (_cairo_gstate_in_stroke),
+ (_cairo_gstate_fill), (_cairo_gstate_in_fill),
+ (_cairo_gstate_stroke_extents), (_cairo_gstate_fill_extents),
+ (_cairo_gstate_clip), (_cairo_gstate_text_to_glyphs): Track name
+ change of cairo_path_real_t and _cairo_path_fixed functions.
+
+2005-03-23 Carl Worth <cworth@cworth.org>
+
* src/cairo-path-data-private.h: Remove CAIRO_BEGIN_DECLS and
CAIRO_END_DECLS as they are not needed for private headers.
diff --git a/src/cairo-font.c b/src/cairo-font.c
index 03699af4..96492ee7 100644
--- a/src/cairo-font.c
+++ b/src/cairo-font.c
@@ -137,7 +137,7 @@ cairo_status_t
_cairo_font_glyph_path (cairo_font_t *font,
cairo_glyph_t *glyphs,
int num_glyphs,
- cairo_path_real_t *path)
+ cairo_path_fixed_t *path)
{
return font->backend->glyph_path (font, glyphs, num_glyphs, path);
}
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 7036f26a..fa55cd76 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -1054,14 +1054,14 @@ _cairo_ft_font_show_glyphs (void *abstract_font,
static int
_move_to (FT_Vector *to, void *closure)
{
- cairo_path_real_t *path = closure;
+ cairo_path_fixed_t *path = closure;
cairo_point_t point;
point.x = _cairo_fixed_from_26_6 (to->x);
point.y = _cairo_fixed_from_26_6 (to->y);
- _cairo_path_close_path (path);
- _cairo_path_move_to (path, &point);
+ _cairo_path_fixed_close_path (path);
+ _cairo_path_fixed_move_to (path, &point);
return 0;
}
@@ -1069,13 +1069,13 @@ _move_to (FT_Vector *to, void *closure)
static int
_line_to (FT_Vector *to, void *closure)
{
- cairo_path_real_t *path = closure;
+ cairo_path_fixed_t *path = closure;
cairo_point_t point;
point.x = _cairo_fixed_from_26_6 (to->x);
point.y = _cairo_fixed_from_26_6 (to->y);
- _cairo_path_line_to (path, &point);
+ _cairo_path_fixed_line_to (path, &point);
return 0;
}
@@ -1083,12 +1083,12 @@ _line_to (FT_Vector *to, void *closure)
static int
_conic_to (FT_Vector *control, FT_Vector *to, void *closure)
{
- cairo_path_real_t *path = closure;
+ cairo_path_fixed_t *path = closure;
cairo_point_t p0, p1, p2, p3;
cairo_point_t conic;
- _cairo_path_get_current_point (path, &p0);
+ _cairo_path_fixed_get_current_point (path, &p0);
conic.x = _cairo_fixed_from_26_6 (control->x);
conic.y = _cairo_fixed_from_26_6 (control->y);
@@ -1102,8 +1102,8 @@ _conic_to (FT_Vector *control, FT_Vector *to, void *closure)
p2.x = p3.x + 2.0/3.0 * (conic.x - p3.x);
p2.y = p3.y + 2.0/3.0 * (conic.y - p3.y);
- _cairo_path_curve_to (path,
- &p1, &p2, &p3);
+ _cairo_path_fixed_curve_to (path,
+ &p1, &p2, &p3);
return 0;
}
@@ -1111,7 +1111,7 @@ _conic_to (FT_Vector *control, FT_Vector *to, void *closure)
static int
_cubic_to (FT_Vector *control1, FT_Vector *control2, FT_Vector *to, void *closure)
{
- cairo_path_real_t *path = closure;
+ cairo_path_fixed_t *path = closure;
cairo_point_t p0, p1, p2;
p0.x = _cairo_fixed_from_26_6 (control1->x);
@@ -1123,7 +1123,7 @@ _cubic_to (FT_Vector *control1, FT_Vector *control2, FT_Vector *to, void *closur
p2.x = _cairo_fixed_from_26_6 (to->x);
p2.y = _cairo_fixed_from_26_6 (to->y);
- _cairo_path_curve_to (path, &p0, &p1, &p2);
+ _cairo_path_fixed_curve_to (path, &p0, &p1, &p2);
return 0;
}
@@ -1132,7 +1132,7 @@ static cairo_status_t
_cairo_ft_font_glyph_path (void *abstract_font,
cairo_glyph_t *glyphs,
int num_glyphs,
- cairo_path_real_t *path)
+ cairo_path_fixed_t *path)
{
int i;
cairo_ft_font_t *font = abstract_font;
@@ -1176,7 +1176,7 @@ _cairo_ft_font_glyph_path (void *abstract_font,
DOUBLE_TO_26_6(glyphs[i].y));
FT_Outline_Decompose (&glyph->outline, &outline_funcs, path);
}
- _cairo_path_close_path (path);
+ _cairo_path_fixed_close_path (path);
cairo_ft_font_unlock_face (abstract_font);
diff --git a/src/cairo-gstate-private.h b/src/cairo-gstate-private.h
index 8630fc06..4faf1de6 100644
--- a/src/cairo-gstate-private.h
+++ b/src/cairo-gstate-private.h
@@ -75,7 +75,7 @@ struct _cairo_gstate {
cairo_matrix_t ctm;
cairo_matrix_t ctm_inverse;
- cairo_path_real_t path;
+ cairo_path_fixed_t path;
cairo_pen_t pen_regular;
diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
index f4e378be..037783a8 100644
--- a/src/cairo-gstate.c
+++ b/src/cairo-gstate.c
@@ -112,7 +112,7 @@ _cairo_gstate_init (cairo_gstate_t *gstate)
gstate->pixels_per_inch = CAIRO_GSTATE_PIXELS_PER_INCH_DEFAULT;
_cairo_gstate_default_matrix (gstate);
- _cairo_path_init (&gstate->path);
+ _cairo_path_fixed_init (&gstate->path);
_cairo_pen_init_empty (&gstate->pen_regular);
@@ -162,7 +162,7 @@ _cairo_gstate_init_copy (cairo_gstate_t *gstate, cairo_gstate_t *other)
cairo_pattern_reference (gstate->pattern);
- status = _cairo_path_init_copy (&gstate->path, &other->path);
+ status = _cairo_path_fixed_init_copy (&gstate->path, &other->path);
if (status)
goto CLEANUP_FONT;
@@ -173,7 +173,7 @@ _cairo_gstate_init_copy (cairo_gstate_t *gstate, cairo_gstate_t *other)
return status;
CLEANUP_PATH:
- _cairo_path_fini (&gstate->path);
+ _cairo_path_fixed_fini (&gstate->path);
CLEANUP_FONT:
cairo_font_destroy (gstate->font);
@@ -219,7 +219,7 @@ _cairo_gstate_fini (cairo_gstate_t *gstate)
_cairo_matrix_fini (&gstate->ctm);
_cairo_matrix_fini (&gstate->ctm_inverse);
- _cairo_path_fini (&gstate->path);
+ _cairo_path_fixed_fini (&gstate->path);
_cairo_pen_fini (&gstate->pen_regular);
@@ -757,7 +757,7 @@ _cairo_gstate_backend_to_user (cairo_gstate_t *gstate, double *x, double *y)
cairo_status_t
_cairo_gstate_new_path (cairo_gstate_t *gstate)
{
- _cairo_path_fini (&gstate->path);
+ _cairo_path_fixed_fini (&gstate->path);
return CAIRO_STATUS_SUCCESS;
}
@@ -772,7 +772,7 @@ _cairo_gstate_move_to (cairo_gstate_t *gstate, double x, double y)
point.x = _cairo_fixed_from_double (x);
point.y = _cairo_fixed_from_double (y);
- return _cairo_path_move_to (&gstate->path, &point);
+ return _cairo_path_fixed_move_to (&gstate->path, &point);
}
cairo_status_t
@@ -785,7 +785,7 @@ _cairo_gstate_line_to (cairo_gstate_t *gstate, double x, double y)
point.x = _cairo_fixed_from_double (x);
point.y = _cairo_fixed_from_double (y);
- return _cairo_path_line_to (&gstate->path, &point);
+ return _cairo_path_fixed_line_to (&gstate->path, &point);
}
cairo_status_t
@@ -809,7 +809,7 @@ _cairo_gstate_curve_to (cairo_gstate_t *gstate,
p2.x = _cairo_fixed_from_double (x2);
p2.y = _cairo_fixed_from_double (y2);
- return _cairo_path_curve_to (&gstate->path, &p0, &p1, &p2);
+ return _cairo_path_fixed_curve_to (&gstate->path, &p0, &p1, &p2);
}
/* Spline deviation from the circle in radius would be given by:
@@ -1095,7 +1095,7 @@ _cairo_gstate_rel_move_to (cairo_gstate_t *gstate, double dx, double dy)
distance.dx = _cairo_fixed_from_double (dx);
distance.dy = _cairo_fixed_from_double (dy);
- return _cairo_path_rel_move_to (&gstate->path, &distance);
+ return _cairo_path_fixed_rel_move_to (&gstate->path, &distance);
}
cairo_status_t
@@ -1108,7 +1108,7 @@ _cairo_gstate_rel_line_to (cairo_gstate_t *gstate, double dx, double dy)
distance.dx = _cairo_fixed_from_double (dx);
distance.dy = _cairo_fixed_from_double (dy);
- return _cairo_path_rel_line_to (&gstate->path, &distance);
+ return _cairo_path_fixed_rel_line_to (&gstate->path, &distance);
}
cairo_status_t
@@ -1132,10 +1132,10 @@ _cairo_gstate_rel_curve_to (cairo_gstate_t *gstate,
distance[2].dx = _cairo_fixed_from_double (dx2);
distance[2].dy = _cairo_fixed_from_double (dy2);
- return _cairo_path_rel_curve_to (&gstate->path,
- &distance[0],
- &distance[1],
- &distance[2]);
+ return _cairo_path_fixed_rel_curve_to (&gstate->path,
+ &distance[0],
+ &distance[1],
+ &distance[2]);
}
/* XXX: NYI
@@ -1152,7 +1152,7 @@ _cairo_gstate_stroke_path (cairo_gstate_t *gstate)
cairo_status_t
_cairo_gstate_close_path (cairo_gstate_t *gstate)
{
- return _cairo_path_close_path (&gstate->path);
+ return _cairo_path_fixed_close_path (&gstate->path);
}
cairo_status_t
@@ -1162,7 +1162,7 @@ _cairo_gstate_get_current_point (cairo_gstate_t *gstate, double *x_ret, double *
cairo_point_t point;
double x, y;
- status = _cairo_path_get_current_point (&gstate->path, &point);
+ status = _cairo_path_fixed_get_current_point (&gstate->path, &point);
if (status == CAIRO_STATUS_NO_CURRENT_POINT) {
x = 0.0;
y = 0.0;
@@ -1304,12 +1304,12 @@ _cairo_gstate_interpret_path (cairo_gstate_t *gstate,
cairo_close_path_func_t *close_path,
void *closure)
{
- cairo_path_real_t path;
+ cairo_path_fixed_t path;
gpi_t gpi;
/* Anything we want from gstate must be copied. We must not retain
pointers into gstate. */
- _cairo_path_init_copy (&path, &gstate->path);
+ _cairo_path_fixed_init_copy (&path, &gstate->path);
cairo_matrix_copy (&gpi.ctm_inverse, &gstate->ctm_inverse);
if (gstate->surface)
@@ -1328,13 +1328,13 @@ _cairo_gstate_interpret_path (cairo_gstate_t *gstate,
gpi.current_point.x = 0;
gpi.current_point.y = 0;
- return _cairo_path_interpret (&path,
- CAIRO_DIRECTION_FORWARD,
- _gpi_move_to,
- _gpi_line_to,
- _gpi_curve_to,
- _gpi_close_path,
- &gpi);
+ return _cairo_path_fixed_interpret (&path,
+ CAIRO_DIRECTION_FORWARD,
+ _gpi_move_to,
+ _gpi_line_to,
+ _gpi_curve_to,
+ _gpi_close_path,
+ &gpi);
}
static void
@@ -1377,7 +1377,7 @@ _cairo_gstate_stroke (cairo_gstate_t *gstate)
_cairo_traps_init (&traps);
- status = _cairo_path_stroke_to_traps (&gstate->path, gstate, &traps);
+ status = _cairo_path_fixed_stroke_to_traps (&gstate->path, gstate, &traps);
if (status) {
_cairo_traps_fini (&traps);
return status;
@@ -1411,7 +1411,7 @@ _cairo_gstate_in_stroke (cairo_gstate_t *gstate,
_cairo_traps_init (&traps);
- status = _cairo_path_stroke_to_traps (&gstate->path, gstate, &traps);
+ status = _cairo_path_fixed_stroke_to_traps (&gstate->path, gstate, &traps);
if (status)
goto BAIL;
@@ -1672,7 +1672,7 @@ _cairo_gstate_fill (cairo_gstate_t *gstate)
_cairo_traps_init (&traps);
- status = _cairo_path_fill_to_traps (&gstate->path, gstate, &traps);
+ status = _cairo_path_fixed_fill_to_traps (&gstate->path, gstate, &traps);
if (status) {
_cairo_traps_fini (&traps);
return status;
@@ -1704,7 +1704,7 @@ _cairo_gstate_in_fill (cairo_gstate_t *gstate,
_cairo_traps_init (&traps);
- status = _cairo_path_fill_to_traps (&gstate->path, gstate, &traps);
+ status = _cairo_path_fixed_fill_to_traps (&gstate->path, gstate, &traps);
if (status)
goto BAIL;
@@ -1745,7 +1745,7 @@ _cairo_gstate_stroke_extents (cairo_gstate_t *gstate,
_cairo_traps_init (&traps);
- status = _cairo_path_stroke_to_traps (&gstate->path, gstate, &traps);
+ status = _cairo_path_fixed_stroke_to_traps (&gstate->path, gstate, &traps);
if (status)
goto BAIL;
@@ -1776,7 +1776,7 @@ _cairo_gstate_fill_extents (cairo_gstate_t *gstate,
_cairo_traps_init (&traps);
- status = _cairo_path_fill_to_traps (&gstate->path, gstate, &traps);
+ status = _cairo_path_fixed_fill_to_traps (&gstate->path, gstate, &traps);
if (status)
goto BAIL;
@@ -1883,7 +1883,7 @@ _cairo_gstate_clip (cairo_gstate_t *gstate)
/* Fill the clip region as traps. */
_cairo_traps_init (&traps);
- status = _cairo_path_fill_to_traps (&gstate->path, gstate, &traps);
+ status = _cairo_path_fixed_fill_to_traps (&gstate->path, gstate, &traps);
if (status) {
_cairo_traps_fini (&traps);
return status;
@@ -2379,7 +2379,7 @@ _cairo_gstate_text_to_glyphs (cairo_gstate_t *gstate,
if (status)
return status;
- status = _cairo_path_get_current_point (&gstate->path, &point);
+ status = _cairo_path_fixed_get_current_point (&gstate->path, &point);
if (status == CAIRO_STATUS_NO_CURRENT_POINT) {
origin_x = 0.0;
origin_y = 0.0;
diff --git a/src/cairo-path-bounds.c b/src/cairo-path-bounds.c
index 63b3d7a4..670036cf 100644
--- a/src/cairo-path-bounds.c
+++ b/src/cairo-path-bounds.c
@@ -151,9 +151,9 @@ _cairo_path_bounder_close_path (void *closure)
/* XXX: Perhaps this should compute a PixRegion rather than 4 doubles */
cairo_status_t
-_cairo_path_bounds (cairo_path_real_t *path,
- double *x1, double *y1,
- double *x2, double *y2)
+_cairo_path_fixed_bounds (cairo_path_fixed_t *path,
+ double *x1, double *y1,
+ double *x2, double *y2)
{
cairo_status_t status;
@@ -161,12 +161,12 @@ _cairo_path_bounds (cairo_path_real_t *path,
_cairo_path_bounder_init (&bounder);
- status = _cairo_path_interpret (path, CAIRO_DIRECTION_FORWARD,
- _cairo_path_bounder_move_to,
- _cairo_path_bounder_line_to,
- _cairo_path_bounder_curve_to,
- _cairo_path_bounder_close_path,
- &bounder);
+ status = _cairo_path_fixed_interpret (path, CAIRO_DIRECTION_FORWARD,
+ _cairo_path_bounder_move_to,
+ _cairo_path_bounder_line_to,
+ _cairo_path_bounder_curve_to,
+ _cairo_path_bounder_close_path,
+ &bounder);
if (status) {
*x1 = *y1 = *x2 = *y2 = 0.0;
_cairo_path_bounder_fini (&bounder);
diff --git a/src/cairo-path-fill.c b/src/cairo-path-fill.c
index 9cb3903d..3d4f7a9c 100644
--- a/src/cairo-path-fill.c
+++ b/src/cairo-path-fill.c
@@ -174,22 +174,22 @@ _cairo_filler_close_path (void *closure)
}
cairo_status_t
-_cairo_path_fill_to_traps (cairo_path_real_t *path,
- cairo_gstate_t *gstate,
- cairo_traps_t *traps)
+_cairo_path_fixed_fill_to_traps (cairo_path_fixed_t *path,
+ cairo_gstate_t *gstate,
+ cairo_traps_t *traps)
{
cairo_status_t status = CAIRO_STATUS_SUCCESS;
cairo_filler_t filler;
_cairo_filler_init (&filler, gstate, traps);
- status = _cairo_path_interpret (path,
- CAIRO_DIRECTION_FORWARD,
- _cairo_filler_move_to,
- _cairo_filler_line_to,
- _cairo_filler_curve_to,
- _cairo_filler_close_path,
- &filler);
+ status = _cairo_path_fixed_interpret (path,
+ CAIRO_DIRECTION_FORWARD,
+ _cairo_filler_move_to,
+ _cairo_filler_line_to,
+ _cairo_filler_curve_to,
+ _cairo_filler_close_path,
+ &filler);
if (status)
goto BAIL;
diff --git a/src/cairo-path-fixed-private.h b/src/cairo-path-fixed-private.h
index 492e7e5c..b863597a 100644
--- a/src/cairo-path-fixed-private.h
+++ b/src/cairo-path-fixed-private.h
@@ -59,7 +59,7 @@ typedef struct _cairo_path_arg_buf {
struct _cairo_path_arg_buf *next, *prev;
} cairo_path_arg_buf_t;
-struct _cairo_path_real {
+struct _cairo_path_fixed {
cairo_path_op_buf_t *op_head;
cairo_path_op_buf_t *op_tail;
diff --git a/src/cairo-path-stroke.c b/src/cairo-path-stroke.c
index e6e72d0f..4147836d 100644
--- a/src/cairo-path-stroke.c
+++ b/src/cairo-path-stroke.c
@@ -797,9 +797,9 @@ _cairo_stroker_close_path (void *closure)
}
cairo_status_t
-_cairo_path_stroke_to_traps (cairo_path_real_t *path,
- cairo_gstate_t *gstate,
- cairo_traps_t *traps)
+_cairo_path_fixed_stroke_to_traps (cairo_path_fixed_t *path,
+ cairo_gstate_t *gstate,
+ cairo_traps_t *traps)
{
cairo_status_t status = CAIRO_STATUS_SUCCESS;
cairo_stroker_t stroker;
@@ -807,21 +807,21 @@ _cairo_path_stroke_to_traps (cairo_path_real_t *path,
_cairo_stroker_init (&stroker, gstate, traps);
if (gstate->dash)
- status = _cairo_path_interpret (path,
- CAIRO_DIRECTION_FORWARD,
- _cairo_stroker_move_to,
- _cairo_stroker_line_to_dashed,
- _cairo_stroker_curve_to,
- _cairo_stroker_close_path,
- &stroker);
+ status = _cairo_path_fixed_interpret (path,
+ CAIRO_DIRECTION_FORWARD,
+ _cairo_stroker_move_to,
+ _cairo_stroker_line_to_dashed,
+ _cairo_stroker_curve_to,
+ _cairo_stroker_close_path,
+ &stroker);
else
- status = _cairo_path_interpret (path,
- CAIRO_DIRECTION_FORWARD,
- _cairo_stroker_move_to,
- _cairo_stroker_line_to,
- _cairo_stroker_curve_to,
- _cairo_stroker_close_path,
- &stroker);
+ status = _cairo_path_fixed_interpret (path,
+ CAIRO_DIRECTION_FORWARD,
+ _cairo_stroker_move_to,
+ _cairo_stroker_line_to,
+ _cairo_stroker_curve_to,
+ _cairo_stroker_close_path,
+ &stroker);
if (status)
goto BAIL;
diff --git a/src/cairo-path.c b/src/cairo-path.c
index 4eb3c092..da06844d 100644
--- a/src/cairo-path.c
+++ b/src/cairo-path.c
@@ -41,22 +41,22 @@
/* private functions */
static cairo_status_t
-_cairo_path_add (cairo_path_real_t *path,
+_cairo_path_add (cairo_path_fixed_t *path,
cairo_path_op_t op,
cairo_point_t *points,
int num_points);
static void
-_cairo_path_add_op_buf (cairo_path_real_t *path, cairo_path_op_buf_t *op);
+_cairo_path_add_op_buf (cairo_path_fixed_t *path, cairo_path_op_buf_t *op);
static cairo_status_t
-_cairo_path_new_op_buf (cairo_path_real_t *path);
+_cairo_path_new_op_buf (cairo_path_fixed_t *path);
static void
-_cairo_path_add_arg_buf (cairo_path_real_t *path, cairo_path_arg_buf_t *arg);
+_cairo_path_add_arg_buf (cairo_path_fixed_t *path, cairo_path_arg_buf_t *arg);
static cairo_status_t
-_cairo_path_new_arg_buf (cairo_path_real_t *path);
+_cairo_path_new_arg_buf (cairo_path_fixed_t *path);
static cairo_path_op_buf_t *
_cairo_path_op_buf_create (void);
@@ -79,7 +79,7 @@ _cairo_path_arg_buf_add (cairo_path_arg_buf_t *arg,
int num_points);
void
-_cairo_path_init (cairo_path_real_t *path)
+_cairo_path_fixed_init (cairo_path_fixed_t *path)
{
path->op_head = NULL;
path->op_tail = NULL;
@@ -94,12 +94,12 @@ _cairo_path_init (cairo_path_real_t *path)
}
cairo_status_t
-_cairo_path_init_copy (cairo_path_real_t *path, cairo_path_real_t *other)
+_cairo_path_fixed_init_copy (cairo_path_fixed_t *path, cairo_path_fixed_t *other)
{
cairo_path_op_buf_t *op, *other_op;
cairo_path_arg_buf_t *arg, *other_arg;
- _cairo_path_init (path);
+ _cairo_path_fixed_init (path);
path->current_point = other->current_point;
path->has_current_point = other->has_current_point;
path->last_move_point = other->last_move_point;
@@ -107,7 +107,7 @@ _cairo_path_init_copy (cairo_path_real_t *path, cairo_path_real_t *other)
for (other_op = other->op_head; other_op; other_op = other_op->next) {
op = _cairo_path_op_buf_create ();
if (op == NULL) {
- _cairo_path_fini(path);
+ _cairo_path_fixed_fini (path);
return CAIRO_STATUS_NO_MEMORY;
}
*op = *other_op;
@@ -117,7 +117,7 @@ _cairo_path_init_copy (cairo_path_real_t *path, cairo_path_real_t *other)
for (other_arg = other->arg_head; other_arg; other_arg = other_arg->next) {
arg = _cairo_path_arg_buf_create ();
if (arg == NULL) {
- _cairo_path_fini(path);
+ _cairo_path_fixed_fini (path);
return CAIRO_STATUS_NO_MEMORY;
}
*arg = *other_arg;
@@ -128,7 +128,7 @@ _cairo_path_init_copy (cairo_path_real_t *path, cairo_path_real_t *other)
}
void
-_cairo_path_fini (cairo_path_real_t *path)
+_cairo_path_fixed_fini (cairo_path_fixed_t *path)
{
cairo_path_op_buf_t *op;
cairo_path_arg_buf_t *arg;
@@ -151,7 +151,7 @@ _cairo_path_fini (cairo_path_real_t *path)
}
cairo_status_t
-_cairo_path_move_to (cairo_path_real_t *path, cairo_point_t *point)
+_cairo_path_fixed_move_to (cairo_path_fixed_t *path, cairo_point_t *point)
{
cairo_status_t status;
@@ -167,18 +167,18 @@ _cairo_path_move_to (cairo_path_real_t *path, cairo_point_t *point)
}
cairo_status_t
-_cairo_path_rel_move_to (cairo_path_real_t *path, cairo_distance_t *distance)
+_cairo_path_fixed_rel_move_to (cairo_path_fixed_t *path, cairo_distance_t *distance)
{
cairo_point_t point;
point.x = path->current_point.x + distance->dx;
point.y = path->current_point.y + distance->dy;
- return _cairo_path_move_to (path, &point);
+ return _cairo_path_fixed_move_to (path, &point);
}
cairo_status_t
-_cairo_path_line_to (cairo_path_real_t *path, cairo_point_t *point)
+_cairo_path_fixed_line_to (cairo_path_fixed_t *path, cairo_point_t *point)
{
cairo_status_t status;
@@ -193,18 +193,18 @@ _cairo_path_line_to (cairo_path_real_t *path, cairo_point_t *point)
}
cairo_status_t
-_cairo_path_rel_line_to (cairo_path_real_t *path, cairo_distance_t *distance)
+_cairo_path_fixed_rel_line_to (cairo_path_fixed_t *path, cairo_distance_t *distance)
{
cairo_point_t point;
point.x = path->current_point.x + distance->dx;
point.y = path->current_point.y + distance->dy;
- return _cairo_path_line_to (path, &point);
+ return _cairo_path_fixed_line_to (path, &point);
}
cairo_status_t
-_cairo_path_curve_to (cairo_path_real_t *path,
+_cairo_path_fixed_curve_to (cairo_path_fixed_t *path,
cairo_point_t *p0,
cairo_point_t *p1,
cairo_point_t *p2)
@@ -227,7 +227,7 @@ _cairo_path_curve_to (cairo_path_real_t *path,
}
cairo_status_t
-_cairo_path_rel_curve_to (cairo_path_real_t *path,
+_cairo_path_fixed_rel_curve_to (cairo_path_fixed_t *path,
cairo_distance_t *d0,
cairo_distance_t *d1,
cairo_distance_t *d2)
@@ -243,11 +243,11 @@ _cairo_path_rel_curve_to (cairo_path_real_t *path,
p2.x = path->current_point.x + d2->dx;
p2.y = path->current_point.y + d2->dy;
- return _cairo_path_curve_to (path, &p0, &p1, &p2);
+ return _cairo_path_fixed_curve_to (path, &p0, &p1, &p2);
}
cairo_status_t
-_cairo_path_close_path (cairo_path_real_t *path)
+_cairo_path_fixed_close_path (cairo_path_fixed_t *path)
{
cairo_status_t status;
@@ -263,7 +263,7 @@ _cairo_path_close_path (cairo_path_real_t *path)
}
cairo_status_t
-_cairo_path_get_current_point (cairo_path_real_t *path, cairo_point_t *point)
+_cairo_path_fixed_get_current_point (cairo_path_fixed_t *path, cairo_point_t *point)
{
if (! path->has_current_point)
return CAIRO_STATUS_NO_CURRENT_POINT;
@@ -274,10 +274,10 @@ _cairo_path_get_current_point (cairo_path_real_t *path, cairo_point_t *point)
}
static cairo_status_t
-_cairo_path_add (cairo_path_real_t *path,
- cairo_path_op_t op,
- cairo_point_t *points,
- int num_points)
+_cairo_path_add (cairo_path_fixed_t *path,
+ cairo_path_op_t op,
+ cairo_point_t *points,
+ int num_points)
{
cairo_status_t status;
@@ -299,7 +299,7 @@ _cairo_path_add (cairo_path_real_t *path,
}
static void
-_cairo_path_add_op_buf (cairo_path_real_t *path, cairo_path_op_buf_t *op)
+_cairo_path_add_op_buf (cairo_path_fixed_t *path, cairo_path_op_buf_t *op)
{
op->next = NULL;
op->prev = path->op_tail;
@@ -314,7 +314,7 @@ _cairo_path_add_op_buf (cairo_path_real_t *path, cairo_path_op_buf_t *op)
}
static cairo_status_t
-_cairo_path_new_op_buf (cairo_path_real_t *path)
+_cairo_path_new_op_buf (cairo_path_fixed_t *path)
{
cairo_path_op_buf_t *op;
@@ -328,7 +328,7 @@ _cairo_path_new_op_buf (cairo_path_real_t *path)
}
static void
-_cairo_path_add_arg_buf (cairo_path_real_t *path, cairo_path_arg_buf_t *arg)
+_cairo_path_add_arg_buf (cairo_path_fixed_t *path, cairo_path_arg_buf_t *arg)
{
arg->next = NULL;
arg->prev = path->arg_tail;
@@ -343,7 +343,7 @@ _cairo_path_add_arg_buf (cairo_path_real_t *path, cairo_path_arg_buf_t *arg)
}
static cairo_status_t
-_cairo_path_new_arg_buf (cairo_path_real_t *path)
+_cairo_path_new_arg_buf (cairo_path_fixed_t *path)
{
cairo_path_arg_buf_t *arg;
@@ -426,13 +426,13 @@ static int const num_args[] =
};
cairo_status_t
-_cairo_path_interpret (cairo_path_real_t *path,
- cairo_direction_t dir,
- cairo_path_move_to_func_t *move_to,
- cairo_path_line_to_func_t *line_to,
- cairo_path_curve_to_func_t *curve_to,
- cairo_path_close_path_func_t *close_path,
- void *closure)
+_cairo_path_fixed_interpret (cairo_path_fixed_t *path,
+ cairo_direction_t dir,
+ cairo_path_fixed_move_to_func_t *move_to,
+ cairo_path_fixed_line_to_func_t *line_to,
+ cairo_path_fixed_curve_to_func_t *curve_to,
+ cairo_path_fixed_close_path_func_t *close_path,
+ void *closure)
{
cairo_status_t status;
int i, arg;
diff --git a/src/cairo_font.c b/src/cairo_font.c
index 03699af4..96492ee7 100644
--- a/src/cairo_font.c
+++ b/src/cairo_font.c
@@ -137,7 +137,7 @@ cairo_status_t
_cairo_font_glyph_path (cairo_font_t *font,
cairo_glyph_t *glyphs,
int num_glyphs,
- cairo_path_real_t *path)
+ cairo_path_fixed_t *path)
{
return font->backend->glyph_path (font, glyphs, num_glyphs, path);
}
diff --git a/src/cairo_ft_font.c b/src/cairo_ft_font.c
index 7036f26a..fa55cd76 100644
--- a/src/cairo_ft_font.c
+++ b/src/cairo_ft_font.c
@@ -1054,14 +1054,14 @@ _cairo_ft_font_show_glyphs (void *abstract_font,
static int
_move_to (FT_Vector *to, void *closure)
{
- cairo_path_real_t *path = closure;
+ cairo_path_fixed_t *path = closure;
cairo_point_t point;
point.x = _cairo_fixed_from_26_6 (to->x);
point.y = _cairo_fixed_from_26_6 (to->y);
- _cairo_path_close_path (path);
- _cairo_path_move_to (path, &point);
+ _cairo_path_fixed_close_path (path);
+ _cairo_path_fixed_move_to (path, &point);
return 0;
}
@@ -1069,13 +1069,13 @@ _move_to (FT_Vector *to, void *closure)
static int
_line_to (FT_Vector *to, void *closure)
{
- cairo_path_real_t *path = closure;
+ cairo_path_fixed_t *path = closure;
cairo_point_t point;
point.x = _cairo_fixed_from_26_6 (to->x);
point.y = _cairo_fixed_from_26_6 (to->y);
- _cairo_path_line_to (path, &point);
+ _cairo_path_fixed_line_to (path, &point);
return 0;
}
@@ -1083,12 +1083,12 @@ _line_to (FT_Vector *to, void *closure)
static int
_conic_to (FT_Vector *control, FT_Vector *to, void *closure)
{
- cairo_path_real_t *path = closure;
+ cairo_path_fixed_t *path = closure;
cairo_point_t p0, p1, p2, p3;
cairo_point_t conic;
- _cairo_path_get_current_point (path, &p0);
+ _cairo_path_fixed_get_current_point (path, &p0);
conic.x = _cairo_fixed_from_26_6 (control->x);
conic.y = _cairo_fixed_from_26_6 (control->y);
@@ -1102,8 +1102,8 @@ _conic_to (FT_Vector *control, FT_Vector *to, void *closure)
p2.x = p3.x + 2.0/3.0 * (conic.x - p3.x);
p2.y = p3.y + 2.0/3.0 * (conic.y - p3.y);
- _cairo_path_curve_to (path,
- &p1, &p2, &p3);
+ _cairo_path_fixed_curve_to (path,
+ &p1, &p2, &p3);
return 0;
}
@@ -1111,7 +1111,7 @@ _conic_to (FT_Vector *control, FT_Vector *to, void *closure)
static int
_cubic_to (FT_Vector *control1, FT_Vector *control2, FT_Vector *to, void *closure)
{
- cairo_path_real_t *path = closure;
+ cairo_path_fixed_t *path = closure;
cairo_point_t p0, p1, p2;
p0.x = _cairo_fixed_from_26_6 (control1->x);
@@ -1123,7 +1123,7 @@ _cubic_to (FT_Vector *control1, FT_Vector *control2, FT_Vector *to, void *closur
p2.x = _cairo_fixed_from_26_6 (to->x);
p2.y = _cairo_fixed_from_26_6 (to->y);
- _cairo_path_curve_to (path, &p0, &p1, &p2);
+ _cairo_path_fixed_curve_to (path, &p0, &p1, &p2);
return 0;
}
@@ -1132,7 +1132,7 @@ static cairo_status_t
_cairo_ft_font_glyph_path (void *abstract_font,
cairo_glyph_t *glyphs,
int num_glyphs,
- cairo_path_real_t *path)
+ cairo_path_fixed_t *path)
{
int i;
cairo_ft_font_t *font = abstract_font;
@@ -1176,7 +1176,7 @@ _cairo_ft_font_glyph_path (void *abstract_font,
DOUBLE_TO_26_6(glyphs[i].y));
FT_Outline_Decompose (&glyph->outline, &outline_funcs, path);
}
- _cairo_path_close_path (path);
+ _cairo_path_fixed_close_path (path);
cairo_ft_font_unlock_face (abstract_font);
diff --git a/src/cairo_gstate.c b/src/cairo_gstate.c
index f4e378be..037783a8 100644
--- a/src/cairo_gstate.c
+++ b/src/cairo_gstate.c
@@ -112,7 +112,7 @@ _cairo_gstate_init (cairo_gstate_t *gstate)
gstate->pixels_per_inch = CAIRO_GSTATE_PIXELS_PER_INCH_DEFAULT;
_cairo_gstate_default_matrix (gstate);
- _cairo_path_init (&gstate->path);
+ _cairo_path_fixed_init (&gstate->path);
_cairo_pen_init_empty (&gstate->pen_regular);
@@ -162,7 +162,7 @@ _cairo_gstate_init_copy (cairo_gstate_t *gstate, cairo_gstate_t *other)
cairo_pattern_reference (gstate->pattern);
- status = _cairo_path_init_copy (&gstate->path, &other->path);
+ status = _cairo_path_fixed_init_copy (&gstate->path, &other->path);
if (status)
goto CLEANUP_FONT;
@@ -173,7 +173,7 @@ _cairo_gstate_init_copy (cairo_gstate_t *gstate, cairo_gstate_t *other)
return status;
CLEANUP_PATH:
- _cairo_path_fini (&gstate->path);
+ _cairo_path_fixed_fini (&gstate->path);
CLEANUP_FONT:
cairo_font_destroy (gstate->font);
@@ -219,7 +219,7 @@ _cairo_gstate_fini (cairo_gstate_t *gstate)
_cairo_matrix_fini (&gstate->ctm);
_cairo_matrix_fini (&gstate->ctm_inverse);
- _cairo_path_fini (&gstate->path);
+ _cairo_path_fixed_fini (&gstate->path);
_cairo_pen_fini (&gstate->pen_regular);
@@ -757,7 +757,7 @@ _cairo_gstate_backend_to_user (cairo_gstate_t *gstate, double *x, double *y)
cairo_status_t
_cairo_gstate_new_path (cairo_gstate_t *gstate)
{
- _cairo_path_fini (&gstate->path);
+ _cairo_path_fixed_fini (&gstate->path);
return CAIRO_STATUS_SUCCESS;
}
@@ -772,7 +772,7 @@ _cairo_gstate_move_to (cairo_gstate_t *gstate, double x, double y)
point.x = _cairo_fixed_from_double (x);
point.y = _cairo_fixed_from_double (y);
- return _cairo_path_move_to (&gstate->path, &point);
+ return _cairo_path_fixed_move_to (&gstate->path, &point);
}
cairo_status_t
@@ -785,7 +785,7 @@ _cairo_gstate_line_to (cairo_gstate_t *gstate, double x, double y)
point.x = _cairo_fixed_from_double (x);
point.y = _cairo_fixed_from_double (y);
- return _cairo_path_line_to (&gstate->path, &point);
+ return _cairo_path_fixed_line_to (&gstate->path, &point);
}
cairo_status_t
@@ -809,7 +809,7 @@ _cairo_gstate_curve_to (cairo_gstate_t *gstate,
p2.x = _cairo_fixed_from_double (x2);
p2.y = _cairo_fixed_from_double (y2);
- return _cairo_path_curve_to (&gstate->path, &p0, &p1, &p2);
+ return _cairo_path_fixed_curve_to (&gstate->path, &p0, &p1, &p2);
}
/* Spline deviation from the circle in radius would be given by:
@@ -1095,7 +1095,7 @@ _cairo_gstate_rel_move_to (cairo_gstate_t *gstate, double dx, double dy)
distance.dx = _cairo_fixed_from_double (dx);
distance.dy = _cairo_fixed_from_double (dy);
- return _cairo_path_rel_move_to (&gstate->path, &distance);
+ return _cairo_path_fixed_rel_move_to (&gstate->path, &distance);
}
cairo_status_t
@@ -1108,7 +1108,7 @@ _cairo_gstate_rel_line_to (cairo_gstate_t *gstate, double dx, double dy)
distance.dx = _cairo_fixed_from_double (dx);
distance.dy = _cairo_fixed_from_double (dy);
- return _cairo_path_rel_line_to (&gstate->path, &distance);
+ return _cairo_path_fixed_rel_line_to (&gstate->path, &distance);
}
cairo_status_t
@@ -1132,10 +1132,10 @@ _cairo_gstate_rel_curve_to (cairo_gstate_t *gstate,
distance[2].dx = _cairo_fixed_from_double (dx2);
distance[2].dy = _cairo_fixed_from_double (dy2);
- return _cairo_path_rel_curve_to (&gstate->path,
- &distance[0],
- &distance[1],
- &distance[2]);
+ return _cairo_path_fixed_rel_curve_to (&gstate->path,
+ &distance[0],
+ &distance[1],
+ &distance[2]);
}
/* XXX: NYI
@@ -1152,7 +1152,7 @@ _cairo_gstate_stroke_path (cairo_gstate_t *gstate)
cairo_status_t
_cairo_gstate_close_path (cairo_gstate_t *gstate)
{
- return _cairo_path_close_path (&gstate->path);
+ return _cairo_path_fixed_close_path (&gstate->path);
}
cairo_status_t
@@ -1162,7 +1162,7 @@ _cairo_gstate_get_current_point (cairo_gstate_t *gstate, double *x_ret, double *
cairo_point_t point;
double x, y;
- status = _cairo_path_get_current_point (&gstate->path, &point);
+ status = _cairo_path_fixed_get_current_point (&gstate->path, &point);
if (status == CAIRO_STATUS_NO_CURRENT_POINT) {
x = 0.0;
y = 0.0;
@@ -1304,12 +1304,12 @@ _cairo_gstate_interpret_path (cairo_gstate_t *gstate,
cairo_close_path_func_t *close_path,
void *closure)
{
- cairo_path_real_t path;
+ cairo_path_fixed_t path;
gpi_t gpi;
/* Anything we want from gstate must be copied. We must not retain
pointers into gstate. */
- _cairo_path_init_copy (&path, &gstate->path);
+ _cairo_path_fixed_init_copy (&path, &gstate->path);
cairo_matrix_copy (&gpi.ctm_inverse, &gstate->ctm_inverse);
if (gstate->surface)
@@ -1328,13 +1328,13 @@ _cairo_gstate_interpret_path (cairo_gstate_t *gstate,
gpi.current_point.x = 0;
gpi.current_point.y = 0;
- return _cairo_path_interpret (&path,
- CAIRO_DIRECTION_FORWARD,
- _gpi_move_to,
- _gpi_line_to,
- _gpi_curve_to,
- _gpi_close_path,
- &gpi);
+ return _cairo_path_fixed_interpret (&path,
+ CAIRO_DIRECTION_FORWARD,
+ _gpi_move_to,
+ _gpi_line_to,
+ _gpi_curve_to,
+ _gpi_close_path,
+ &gpi);
}
static void
@@ -1377,7 +1377,7 @@ _cairo_gstate_stroke (cairo_gstate_t *gstate)
_cairo_traps_init (&traps);
- status = _cairo_path_stroke_to_traps (&gstate->path, gstate, &traps);
+ status = _cairo_path_fixed_stroke_to_traps (&gstate->path, gstate, &traps);
if (status) {
_cairo_traps_fini (&traps);
return status;
@@ -1411,7 +1411,7 @@ _cairo_gstate_in_stroke (cairo_gstate_t *gstate,
_cairo_traps_init (&traps);
- status = _cairo_path_stroke_to_traps (&gstate->path, gstate, &traps);
+ status = _cairo_path_fixed_stroke_to_traps (&gstate->path, gstate, &traps);
if (status)
goto BAIL;
@@ -1672,7 +1672,7 @@ _cairo_gstate_fill (cairo_gstate_t *gstate)
_cairo_traps_init (&traps);
- status = _cairo_path_fill_to_traps (&gstate->path, gstate, &traps);
+ status = _cairo_path_fixed_fill_to_traps (&gstate->path, gstate, &traps);
if (status) {
_cairo_traps_fini (&traps);
return status;
@@ -1704,7 +1704,7 @@ _cairo_gstate_in_fill (cairo_gstate_t *gstate,
_cairo_traps_init (&traps);
- status = _cairo_path_fill_to_traps (&gstate->path, gstate, &traps);
+ status = _cairo_path_fixed_fill_to_traps (&gstate->path, gstate, &traps);
if (status)
goto BAIL;
@@ -1745,7 +1745,7 @@ _cairo_gstate_stroke_extents (cairo_gstate_t *gstate,
_cairo_traps_init (&traps);
- status = _cairo_path_stroke_to_traps (&gstate->path, gstate, &traps);
+ status = _cairo_path_fixed_stroke_to_traps (&gstate->path, gstate, &traps);
if (status)
goto BAIL;
@@ -1776,7 +1776,7 @@ _cairo_gstate_fill_extents (cairo_gstate_t *gstate,
_cairo_traps_init (&traps);
- status = _cairo_path_fill_to_traps (&gstate->path, gstate, &traps);
+ status = _cairo_path_fixed_fill_to_traps (&gstate->path, gstate, &traps);
if (status)
goto BAIL;
@@ -1883,7 +1883,7 @@ _cairo_gstate_clip (cairo_gstate_t *gstate)
/* Fill the clip region as traps. */
_cairo_traps_init (&traps);
- status = _cairo_path_fill_to_traps (&gstate->path, gstate, &traps);
+ status = _cairo_path_fixed_fill_to_traps (&gstate->path, gstate, &traps);
if (status) {
_cairo_traps_fini (&traps);
return status;
@@ -2379,7 +2379,7 @@ _cairo_gstate_text_to_glyphs (cairo_gstate_t *gstate,
if (status)
return status;
- status = _cairo_path_get_current_point (&gstate->path, &point);
+ status = _cairo_path_fixed_get_current_point (&gstate->path, &point);
if (status == CAIRO_STATUS_NO_CURRENT_POINT) {
origin_x = 0.0;
origin_y = 0.0;
diff --git a/src/cairo_path.c b/src/cairo_path.c
index 4eb3c092..da06844d 100644
--- a/src/cairo_path.c
+++ b/src/cairo_path.c
@@ -41,22 +41,22 @@
/* private functions */
static cairo_status_t
-_cairo_path_add (cairo_path_real_t *path,
+_cairo_path_add (cairo_path_fixed_t *path,
cairo_path_op_t op,
cairo_point_t *points,
int num_points);
static void
-_cairo_path_add_op_buf (cairo_path_real_t *path, cairo_path_op_buf_t *op);
+_cairo_path_add_op_buf (cairo_path_fixed_t *path, cairo_path_op_buf_t *op);
static cairo_status_t
-_cairo_path_new_op_buf (cairo_path_real_t *path);
+_cairo_path_new_op_buf (cairo_path_fixed_t *path);
static void
-_cairo_path_add_arg_buf (cairo_path_real_t *path, cairo_path_arg_buf_t *arg);
+_cairo_path_add_arg_buf (cairo_path_fixed_t *path, cairo_path_arg_buf_t *arg);
static cairo_status_t
-_cairo_path_new_arg_buf (cairo_path_real_t *path);
+_cairo_path_new_arg_buf (cairo_path_fixed_t *path);
static cairo_path_op_buf_t *
_cairo_path_op_buf_create (void);
@@ -79,7 +79,7 @@ _cairo_path_arg_buf_add (cairo_path_arg_buf_t *arg,
int num_points);
void
-_cairo_path_init (cairo_path_real_t *path)
+_cairo_path_fixed_init (cairo_path_fixed_t *path)
{
path->op_head = NULL;
path->op_tail = NULL;
@@ -94,12 +94,12 @@ _cairo_path_init (cairo_path_real_t *path)
}
cairo_status_t
-_cairo_path_init_copy (cairo_path_real_t *path, cairo_path_real_t *other)
+_cairo_path_fixed_init_copy (cairo_path_fixed_t *path, cairo_path_fixed_t *other)
{
cairo_path_op_buf_t *op, *other_op;
cairo_path_arg_buf_t *arg, *other_arg;
- _cairo_path_init (path);
+ _cairo_path_fixed_init (path);
path->current_point = other->current_point;
path->has_current_point = other->has_current_point;
path->last_move_point = other->last_move_point;
@@ -107,7 +107,7 @@ _cairo_path_init_copy (cairo_path_real_t *path, cairo_path_real_t *other)
for (other_op = other->op_head; other_op; other_op = other_op->next) {
op = _cairo_path_op_buf_create ();
if (op == NULL) {
- _cairo_path_fini(path);
+ _cairo_path_fixed_fini (path);
return CAIRO_STATUS_NO_MEMORY;
}
*op = *other_op;
@@ -117,7 +117,7 @@ _cairo_path_init_copy (cairo_path_real_t *path, cairo_path_real_t *other)
for (other_arg = other->arg_head; other_arg; other_arg = other_arg->next) {
arg = _cairo_path_arg_buf_create ();
if (arg == NULL) {
- _cairo_path_fini(path);
+ _cairo_path_fixed_fini (path);
return CAIRO_STATUS_NO_MEMORY;
}
*arg = *other_arg;
@@ -128,7 +128,7 @@ _cairo_path_init_copy (cairo_path_real_t *path, cairo_path_real_t *other)
}
void
-_cairo_path_fini (cairo_path_real_t *path)
+_cairo_path_fixed_fini (cairo_path_fixed_t *path)
{
cairo_path_op_buf_t *op;
cairo_path_arg_buf_t *arg;
@@ -151,7 +151,7 @@ _cairo_path_fini (cairo_path_real_t *path)
}
cairo_status_t
-_cairo_path_move_to (cairo_path_real_t *path, cairo_point_t *point)
+_cairo_path_fixed_move_to (cairo_path_fixed_t *path, cairo_point_t *point)
{
cairo_status_t status;
@@ -167,18 +167,18 @@ _cairo_path_move_to (cairo_path_real_t *path, cairo_point_t *point)
}
cairo_status_t
-_cairo_path_rel_move_to (cairo_path_real_t *path, cairo_distance_t *distance)
+_cairo_path_fixed_rel_move_to (cairo_path_fixed_t *path, cairo_distance_t *distance)
{
cairo_point_t point;
point.x = path->current_point.x + distance->dx;
point.y = path->current_point.y + distance->dy;
- return _cairo_path_move_to (path, &point);
+ return _cairo_path_fixed_move_to (path, &point);
}
cairo_status_t
-_cairo_path_line_to (cairo_path_real_t *path, cairo_point_t *point)
+_cairo_path_fixed_line_to (cairo_path_fixed_t *path, cairo_point_t *point)
{
cairo_status_t status;
@@ -193,18 +193,18 @@ _cairo_path_line_to (cairo_path_real_t *path, cairo_point_t *point)
}
cairo_status_t
-_cairo_path_rel_line_to (cairo_path_real_t *path, cairo_distance_t *distance)
+_cairo_path_fixed_rel_line_to (cairo_path_fixed_t *path, cairo_distance_t *distance)
{
cairo_point_t point;
point.x = path->current_point.x + distance->dx;
point.y = path->current_point.y + distance->dy;
- return _cairo_path_line_to (path, &point);
+ return _cairo_path_fixed_line_to (path, &point);
}
cairo_status_t
-_cairo_path_curve_to (cairo_path_real_t *path,
+_cairo_path_fixed_curve_to (cairo_path_fixed_t *path,
cairo_point_t *p0,
cairo_point_t *p1,
cairo_point_t *p2)
@@ -227,7 +227,7 @@ _cairo_path_curve_to (cairo_path_real_t *path,
}
cairo_status_t
-_cairo_path_rel_curve_to (cairo_path_real_t *path,
+_cairo_path_fixed_rel_curve_to (cairo_path_fixed_t *path,
cairo_distance_t *d0,
cairo_distance_t *d1,
cairo_distance_t *d2)
@@ -243,11 +243,11 @@ _cairo_path_rel_curve_to (cairo_path_real_t *path,
p2.x = path->current_point.x + d2->dx;
p2.y = path->current_point.y + d2->dy;
- return _cairo_path_curve_to (path, &p0, &p1, &p2);
+ return _cairo_path_fixed_curve_to (path, &p0, &p1, &p2);
}
cairo_status_t
-_cairo_path_close_path (cairo_path_real_t *path)
+_cairo_path_fixed_close_path (cairo_path_fixed_t *path)
{
cairo_status_t status;
@@ -263,7 +263,7 @@ _cairo_path_close_path (cairo_path_real_t *path)
}
cairo_status_t
-_cairo_path_get_current_point (cairo_path_real_t *path, cairo_point_t *point)
+_cairo_path_fixed_get_current_point (cairo_path_fixed_t *path, cairo_point_t *point)
{
if (! path->has_current_point)
return CAIRO_STATUS_NO_CURRENT_POINT;
@@ -274,10 +274,10 @@ _cairo_path_get_current_point (cairo_path_real_t *path, cairo_point_t *point)
}
static cairo_status_t
-_cairo_path_add (cairo_path_real_t *path,
- cairo_path_op_t op,
- cairo_point_t *points,
- int num_points)
+_cairo_path_add (cairo_path_fixed_t *path,
+ cairo_path_op_t op,
+ cairo_point_t *points,
+ int num_points)
{
cairo_status_t status;
@@ -299,7 +299,7 @@ _cairo_path_add (cairo_path_real_t *path,
}
static void
-_cairo_path_add_op_buf (cairo_path_real_t *path, cairo_path_op_buf_t *op)
+_cairo_path_add_op_buf (cairo_path_fixed_t *path, cairo_path_op_buf_t *op)
{
op->next = NULL;
op->prev = path->op_tail;
@@ -314,7 +314,7 @@ _cairo_path_add_op_buf (cairo_path_real_t *path, cairo_path_op_buf_t *op)
}
static cairo_status_t
-_cairo_path_new_op_buf (cairo_path_real_t *path)
+_cairo_path_new_op_buf (cairo_path_fixed_t *path)
{
cairo_path_op_buf_t *op;
@@ -328,7 +328,7 @@ _cairo_path_new_op_buf (cairo_path_real_t *path)
}
static void
-_cairo_path_add_arg_buf (cairo_path_real_t *path, cairo_path_arg_buf_t *arg)
+_cairo_path_add_arg_buf (cairo_path_fixed_t *path, cairo_path_arg_buf_t *arg)
{
arg->next = NULL;
arg->prev = path->arg_tail;
@@ -343,7 +343,7 @@ _cairo_path_add_arg_buf (cairo_path_real_t *path, cairo_path_arg_buf_t *arg)
}
static cairo_status_t
-_cairo_path_new_arg_buf (cairo_path_real_t *path)
+_cairo_path_new_arg_buf (cairo_path_fixed_t *path)
{
cairo_path_arg_buf_t *arg;
@@ -426,13 +426,13 @@ static int const num_args[] =
};
cairo_status_t
-_cairo_path_interpret (cairo_path_real_t *path,
- cairo_direction_t dir,
- cairo_path_move_to_func_t *move_to,
- cairo_path_line_to_func_t *line_to,
- cairo_path_curve_to_func_t *curve_to,
- cairo_path_close_path_func_t *close_path,
- void *closure)
+_cairo_path_fixed_interpret (cairo_path_fixed_t *path,
+ cairo_direction_t dir,
+ cairo_path_fixed_move_to_func_t *move_to,
+ cairo_path_fixed_line_to_func_t *line_to,
+ cairo_path_fixed_curve_to_func_t *curve_to,
+ cairo_path_fixed_close_path_func_t *close_path,
+ void *closure)
{
cairo_status_t status;
int i, arg;
diff --git a/src/cairo_path_bounds.c b/src/cairo_path_bounds.c
index 63b3d7a4..670036cf 100644
--- a/src/cairo_path_bounds.c
+++ b/src/cairo_path_bounds.c
@@ -151,9 +151,9 @@ _cairo_path_bounder_close_path (void *closure)
/* XXX: Perhaps this should compute a PixRegion rather than 4 doubles */
cairo_status_t
-_cairo_path_bounds (cairo_path_real_t *path,
- double *x1, double *y1,
- double *x2, double *y2)
+_cairo_path_fixed_bounds (cairo_path_fixed_t *path,
+ double *x1, double *y1,
+ double *x2, double *y2)
{
cairo_status_t status;
@@ -161,12 +161,12 @@ _cairo_path_bounds (cairo_path_real_t *path,
_cairo_path_bounder_init (&bounder);
- status = _cairo_path_interpret (path, CAIRO_DIRECTION_FORWARD,
- _cairo_path_bounder_move_to,
- _cairo_path_bounder_line_to,
- _cairo_path_bounder_curve_to,
- _cairo_path_bounder_close_path,
- &bounder);
+ status = _cairo_path_fixed_interpret (path, CAIRO_DIRECTION_FORWARD,
+ _cairo_path_bounder_move_to,
+ _cairo_path_bounder_line_to,
+ _cairo_path_bounder_curve_to,
+ _cairo_path_bounder_close_path,
+ &bounder);
if (status) {
*x1 = *y1 = *x2 = *y2 = 0.0;
_cairo_path_bounder_fini (&bounder);
diff --git a/src/cairo_path_fill.c b/src/cairo_path_fill.c
index 9cb3903d..3d4f7a9c 100644
--- a/src/cairo_path_fill.c
+++ b/src/cairo_path_fill.c
@@ -174,22 +174,22 @@ _cairo_filler_close_path (void *closure)
}
cairo_status_t
-_cairo_path_fill_to_traps (cairo_path_real_t *path,
- cairo_gstate_t *gstate,
- cairo_traps_t *traps)
+_cairo_path_fixed_fill_to_traps (cairo_path_fixed_t *path,
+ cairo_gstate_t *gstate,
+ cairo_traps_t *traps)
{
cairo_status_t status = CAIRO_STATUS_SUCCESS;
cairo_filler_t filler;
_cairo_filler_init (&filler, gstate, traps);
- status = _cairo_path_interpret (path,
- CAIRO_DIRECTION_FORWARD,
- _cairo_filler_move_to,
- _cairo_filler_line_to,
- _cairo_filler_curve_to,
- _cairo_filler_close_path,
- &filler);
+ status = _cairo_path_fixed_interpret (path,
+ CAIRO_DIRECTION_FORWARD,
+ _cairo_filler_move_to,
+ _cairo_filler_line_to,
+ _cairo_filler_curve_to,
+ _cairo_filler_close_path,
+ &filler);
if (status)
goto BAIL;
diff --git a/src/cairo_path_stroke.c b/src/cairo_path_stroke.c
index e6e72d0f..4147836d 100644
--- a/src/cairo_path_stroke.c
+++ b/src/cairo_path_stroke.c
@@ -797,9 +797,9 @@ _cairo_stroker_close_path (void *closure)
}
cairo_status_t
-_cairo_path_stroke_to_traps (cairo_path_real_t *path,
- cairo_gstate_t *gstate,
- cairo_traps_t *traps)
+_cairo_path_fixed_stroke_to_traps (cairo_path_fixed_t *path,
+ cairo_gstate_t *gstate,
+ cairo_traps_t *traps)
{
cairo_status_t status = CAIRO_STATUS_SUCCESS;
cairo_stroker_t stroker;
@@ -807,21 +807,21 @@ _cairo_path_stroke_to_traps (cairo_path_real_t *path,
_cairo_stroker_init (&stroker, gstate, traps);
if (gstate->dash)
- status = _cairo_path_interpret (path,
- CAIRO_DIRECTION_FORWARD,
- _cairo_stroker_move_to,
- _cairo_stroker_line_to_dashed,
- _cairo_stroker_curve_to,
- _cairo_stroker_close_path,
- &stroker);
+ status = _cairo_path_fixed_interpret (path,
+ CAIRO_DIRECTION_FORWARD,
+ _cairo_stroker_move_to,
+ _cairo_stroker_line_to_dashed,
+ _cairo_stroker_curve_to,
+ _cairo_stroker_close_path,
+ &stroker);
else
- status = _cairo_path_interpret (path,
- CAIRO_DIRECTION_FORWARD,
- _cairo_stroker_move_to,
- _cairo_stroker_line_to,
- _cairo_stroker_curve_to,
- _cairo_stroker_close_path,
- &stroker);
+ status = _cairo_path_fixed_interpret (path,
+ CAIRO_DIRECTION_FORWARD,
+ _cairo_stroker_move_to,
+ _cairo_stroker_line_to,
+ _cairo_stroker_curve_to,
+ _cairo_stroker_close_path,
+ &stroker);
if (status)
goto BAIL;
diff --git a/src/cairoint.h b/src/cairoint.h
index a7768550..ed2262f1 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -191,7 +191,7 @@ typedef enum cairo_direction {
CAIRO_DIRECTION_REVERSE
} cairo_direction_t;
-typedef struct _cairo_path_real cairo_path_real_t;
+typedef struct _cairo_path_fixed cairo_path_fixed_t;
typedef struct _cairo_edge {
cairo_line_t edge;
@@ -446,52 +446,52 @@ _cairo_glyph_cache_keys_equal (void *cache,
/* the font backend interface */
typedef struct _cairo_font_backend {
- cairo_status_t (*create) (const char *family,
+ cairo_status_t (*create) (const char *family,
cairo_font_slant_t slant,
cairo_font_weight_t weight,
- cairo_font_scale_t *scale,
- cairo_font_t **font);
+ cairo_font_scale_t *scale,
+ cairo_font_t **font);
- void (*destroy_font) (void *font);
- void (*destroy_unscaled_font) (void *font);
+ void (*destroy_font) (void *font);
+ void (*destroy_unscaled_font) (void *font);
- cairo_status_t (*font_extents) (void *font,
- cairo_font_extents_t *extents);
+ cairo_status_t (*font_extents) (void *font,
+ cairo_font_extents_t *extents);
- cairo_status_t (*text_to_glyphs) (void *font,
- const unsigned char *utf8,
- cairo_glyph_t **glyphs,
- int *num_glyphs);
+ cairo_status_t (*text_to_glyphs) (void *font,
+ const unsigned char *utf8,
+ cairo_glyph_t **glyphs,
+ int *num_glyphs);
- cairo_status_t (*glyph_extents) (void *font,
- cairo_glyph_t *glyphs,
+ cairo_status_t (*glyph_extents) (void *font,
+ cairo_glyph_t *glyphs,
int num_glyphs,
- cairo_text_extents_t *extents);
+ cairo_text_extents_t *extents);
- cairo_status_t (*glyph_bbox) (void *font,
- const cairo_glyph_t *glyphs,
+ cairo_status_t (*glyph_bbox) (void *font,
+ const cairo_glyph_t *glyphs,
int num_glyphs,
- cairo_box_t *bbox);
+ cairo_box_t *bbox);
- cairo_status_t (*show_glyphs) (void *font,
+ cairo_status_t (*show_glyphs) (void *font,
cairo_operator_t operator,
- cairo_pattern_t *pattern,
- cairo_surface_t *surface,
+ cairo_pattern_t *pattern,
+ cairo_surface_t *surface,
int source_x,
int source_y,
int dest_x,
int dest_y,
unsigned int width,
unsigned int height,
- const cairo_glyph_t *glyphs,
+ const cairo_glyph_t *glyphs,
int num_glyphs);
- cairo_status_t (*glyph_path) (void *font,
- cairo_glyph_t *glyphs,
+ cairo_status_t (*glyph_path) (void *font,
+ cairo_glyph_t *glyphs,
int num_glyphs,
- cairo_path_real_t *path);
- void (*get_glyph_cache_key) (void *font,
- cairo_glyph_cache_key_t *key);
+ cairo_path_fixed_t *path);
+ void (*get_glyph_cache_key) (void *font,
+ cairo_glyph_cache_key_t *key);
cairo_status_t (*create_glyph) (cairo_image_glyph_cache_entry_t *entry);
@@ -1238,13 +1238,13 @@ cairo_private cairo_status_t
_cairo_font_glyph_path (cairo_font_t *font,
cairo_glyph_t *glyphs,
int num_glyphs,
- cairo_path_real_t *path);
+ cairo_path_fixed_t *path);
cairo_private cairo_status_t
_cairo_font_glyph_path (cairo_font_t *font,
cairo_glyph_t *glyphs,
int num_glyphs,
- cairo_path_real_t *path);
+ cairo_path_fixed_t *path);
cairo_private void
_cairo_font_get_glyph_cache_key (cairo_font_t *font,
@@ -1256,82 +1256,92 @@ _cairo_hull_compute (cairo_pen_vertex_t *vertices, int *num_vertices);
/* cairo_path.c */
cairo_private void
-_cairo_path_init (cairo_path_real_t *path);
+_cairo_path_fixed_init (cairo_path_fixed_t *path);
cairo_private cairo_status_t
-_cairo_path_init_copy (cairo_path_real_t *path, cairo_path_real_t *other);
+_cairo_path_fixed_init_copy (cairo_path_fixed_t *path,
+ cairo_path_fixed_t *other);
cairo_private void
-_cairo_path_fini (cairo_path_real_t *path);
+_cairo_path_fixed_fini (cairo_path_fixed_t *path);
cairo_private cairo_status_t
-_cairo_path_move_to (cairo_path_real_t *path, cairo_point_t *point);
+_cairo_path_fixed_move_to (cairo_path_fixed_t *path,
+ cairo_point_t *point);
cairo_private cairo_status_t
-_cairo_path_rel_move_to (cairo_path_real_t *path, cairo_slope_t *slope);
+_cairo_path_fixed_rel_move_to (cairo_path_fixed_t *path,
+ cairo_slope_t *slope);
cairo_private cairo_status_t
-_cairo_path_line_to (cairo_path_real_t *path, cairo_point_t *point);
+_cairo_path_fixed_line_to (cairo_path_fixed_t *path,
+ cairo_point_t *point);
cairo_private cairo_status_t
-_cairo_path_rel_line_to (cairo_path_real_t *path, cairo_slope_t *slope);
+_cairo_path_fixed_rel_line_to (cairo_path_fixed_t *path,
+ cairo_slope_t *slope);
cairo_private cairo_status_t
-_cairo_path_curve_to (cairo_path_real_t *path,
- cairo_point_t *p0,
- cairo_point_t *p1,
- cairo_point_t *p2);
+_cairo_path_fixed_curve_to (cairo_path_fixed_t *path,
+ cairo_point_t *p0,
+ cairo_point_t *p1,
+ cairo_point_t *p2);
cairo_private cairo_status_t
-_cairo_path_rel_curve_to (cairo_path_real_t *path,
- cairo_slope_t *s0,
- cairo_slope_t *s1,
- cairo_slope_t *s2);
+_cairo_path_fixed_rel_curve_to (cairo_path_fixed_t *path,
+ cairo_slope_t *s0,
+ cairo_slope_t *s1,
+ cairo_slope_t *s2);
cairo_private cairo_status_t
-_cairo_path_close_path (cairo_path_real_t *path);
+_cairo_path_fixed_close_path (cairo_path_fixed_t *path);
cairo_private cairo_status_t
-_cairo_path_get_current_point (cairo_path_real_t *path, cairo_point_t *point);
+_cairo_path_fixed_get_current_point (cairo_path_fixed_t *path,
+ cairo_point_t *point);
-typedef cairo_status_t (cairo_path_move_to_func_t) (void *closure,
- cairo_point_t *point);
+typedef cairo_status_t
+(cairo_path_fixed_move_to_func_t) (void *closure,
+ cairo_point_t *point);
-typedef cairo_status_t (cairo_path_line_to_func_t) (void *closure,
- cairo_point_t *point);
+typedef cairo_status_t
+(cairo_path_fixed_line_to_func_t) (void *closure,
+ cairo_point_t *point);
-typedef cairo_status_t (cairo_path_curve_to_func_t) (void *closure,
- cairo_point_t *p0,
- cairo_point_t *p1,
- cairo_point_t *p2);
+typedef cairo_status_t
+(cairo_path_fixed_curve_to_func_t) (void *closure,
+ cairo_point_t *p0,
+ cairo_point_t *p1,
+ cairo_point_t *p2);
-typedef cairo_status_t (cairo_path_close_path_func_t) (void *closure);
+typedef cairo_status_t
+(cairo_path_fixed_close_path_func_t) (void *closure);
cairo_private cairo_status_t
-_cairo_path_interpret (cairo_path_real_t *path,
- cairo_direction_t dir,
- cairo_path_move_to_func_t *move_to,
- cairo_path_line_to_func_t *line_to,
- cairo_path_curve_to_func_t *curve_to,
- cairo_path_close_path_func_t *close_path,
- void *closure);
+_cairo_path_fixed_interpret (cairo_path_fixed_t *path,
+ cairo_direction_t dir,
+ cairo_path_fixed_move_to_func_t *move_to,
+ cairo_path_fixed_line_to_func_t *line_to,
+ cairo_path_fixed_curve_to_func_t *curve_to,
+ cairo_path_fixed_close_path_func_t *close_path,
+ void *closure);
cairo_private cairo_status_t
-_cairo_path_bounds (cairo_path_real_t *path,
- double *x1, double *y1,
- double *x2, double *y2);
+_cairo_path_fixed_bounds (cairo_path_fixed_t *path,
+ double *x1, double *y1,
+ double *x2, double *y2);
/* cairo_path_fill.c */
cairo_private cairo_status_t
-_cairo_path_fill_to_traps (cairo_path_real_t *path,
- cairo_gstate_t *gstate,
- cairo_traps_t *traps);
+_cairo_path_fixed_fill_to_traps (cairo_path_fixed_t *path,
+ cairo_gstate_t *gstate,
+ cairo_traps_t *traps);
/* cairo_path_stroke.c */
cairo_private cairo_status_t
-_cairo_path_stroke_to_traps (cairo_path_real_t *path,
- cairo_gstate_t *gstate,
- cairo_traps_t *traps);
+_cairo_path_fixed_stroke_to_traps (cairo_path_fixed_t *path,
+ cairo_gstate_t *gstate,
+ cairo_traps_t *traps);
/* cairo_surface.c */
cairo_private cairo_surface_t *