[Commit] cairo/src cairo_path.c, 1.6, 1.7 cairo_path_bounds.c, 1.5,
1.6 cairo_path_fill.c, 1.4, 1.5 cairo_path_stroke.c, 1.7,
1.8 cairo_pen.c, 1.7, 1.8 cairo_spline.c, 1.4, 1.5 cairoint.h,
1.19, 1.20
Carl Worth
commit at keithp.com
Sat Sep 27 06:00:50 PDT 2003
Committed by: cworth
Update of /local/src/CVS/cairo/src
In directory home.keithp.com:/tmp/cvs-serv25884/src
Modified Files:
cairo_path.c cairo_path_bounds.c cairo_path_fill.c
cairo_path_stroke.c cairo_pen.c cairo_spline.c cairoint.h
Log Message:
Fixed some internal enums that had been mistakenly converted to lowercase at some point.
Index: cairo_path.c
===================================================================
RCS file: /local/src/CVS/cairo/src/cairo_path.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- cairo_path.c 25 Sep 2003 22:01:28 -0000 1.6
+++ cairo_path.c 27 Sep 2003 12:00:47 -0000 1.7
@@ -130,7 +130,7 @@
pt.x = XDoubleToFixed (x);
pt.y = XDoubleToFixed (y);
- return _cairo_path_add (path, cairo_path_op_move_to, &pt, 1);
+ return _cairo_path_add (path, CAIRO_PATH_OP_MOVE_TO, &pt, 1);
}
cairo_status_t
@@ -141,7 +141,7 @@
pt.x = XDoubleToFixed (x);
pt.y = XDoubleToFixed (y);
- return _cairo_path_add (path, cairo_path_op_line_to, &pt, 1);
+ return _cairo_path_add (path, CAIRO_PATH_OP_LINE_TO, &pt, 1);
}
cairo_status_t
@@ -161,13 +161,13 @@
pt[2].x = XDoubleToFixed (x3);
pt[2].y = XDoubleToFixed (y3);
- return _cairo_path_add (path, cairo_path_op_curve_to, pt, 3);
+ return _cairo_path_add (path, CAIRO_PATH_OP_CURVE_TO, pt, 3);
}
cairo_status_t
_cairo_path_close_path (cairo_path_t *path)
{
- return _cairo_path_add (path, cairo_path_op_close_path, NULL, 0);
+ return _cairo_path_add (path, CAIRO_PATH_OP_CLOSE_PATH, NULL, 0);
}
static cairo_status_t
@@ -320,7 +320,7 @@
};
cairo_status_t
-_cairo_path_interpret (cairo_path_t *path, cairo_path_direction_t dir, const cairo_path_callbacks_t *cb, void *closure)
+_cairo_path_interpret (cairo_path_t *path, cairo_direction_t dir, const cairo_path_callbacks_t *cb, void *closure)
{
cairo_status_t status;
int i, arg;
@@ -333,14 +333,14 @@
cairo_point_t first = {0, 0};
int has_current = 0;
int has_edge = 0;
- int step = (dir == cairo_path_direction_forward) ? 1 : -1;
+ int step = (dir == CAIRO_DIRECTION_FORWARD) ? 1 : -1;
- for (op_buf = (dir == cairo_path_direction_forward) ? path->op_head : path->op_tail;
+ for (op_buf = (dir == CAIRO_DIRECTION_FORWARD) ? path->op_head : path->op_tail;
op_buf;
- op_buf = (dir == cairo_path_direction_forward) ? op_buf->next : op_buf->prev)
+ op_buf = (dir == CAIRO_DIRECTION_FORWARD) ? op_buf->next : op_buf->prev)
{
int start, stop;
- if (dir == cairo_path_direction_forward) {
+ if (dir == CAIRO_DIRECTION_FORWARD) {
start = 0;
stop = op_buf->num_ops;
} else {
@@ -351,7 +351,7 @@
for (i=start; i != stop; i += step) {
op = op_buf->op[i];
- if (dir == cairo_path_direction_reverse) {
+ if (dir == CAIRO_DIRECTION_REVERSE) {
if (buf_i == 0) {
arg_buf = arg_buf->prev;
buf_i = arg_buf->num_pts;
@@ -368,14 +368,14 @@
}
}
- if (dir == cairo_path_direction_reverse) {
+ if (dir == CAIRO_DIRECTION_REVERSE) {
buf_i -= num_args[op];
}
switch (op) {
- case cairo_path_op_move_to:
+ case CAIRO_PATH_OP_MOVE_TO:
if (has_edge) {
- status = (*cb->done_sub_path) (closure, cairo_sub_path_done_cap);
+ status = (*cb->done_sub_path) (closure, CAIRO_SUB_PATH_DONE_CAP);
if (status)
return status;
}
@@ -384,7 +384,7 @@
has_current = 1;
has_edge = 0;
break;
- case cairo_path_op_line_to:
+ case CAIRO_PATH_OP_LINE_TO:
if (has_current) {
status = (*cb->add_edge) (closure, ¤t, &pt[0]);
if (status)
@@ -398,7 +398,7 @@
has_edge = 0;
}
break;
- case cairo_path_op_curve_to:
+ case CAIRO_PATH_OP_CURVE_TO:
if (has_current) {
status = (*cb->add_spline) (closure, ¤t, &pt[0], &pt[1], &pt[2]);
if (status)
@@ -412,10 +412,10 @@
has_edge = 0;
}
break;
- case cairo_path_op_close_path:
+ case CAIRO_PATH_OP_CLOSE_PATH:
if (has_edge) {
(*cb->add_edge) (closure, ¤t, &first);
- (*cb->done_sub_path) (closure, cairo_sub_path_done_join);
+ (*cb->done_sub_path) (closure, CAIRO_SUB_PATH_DONE_JOIN);
}
current.x = 0;
current.y = 0;
@@ -428,9 +428,8 @@
}
}
if (has_edge)
- (*cb->done_sub_path) (closure, cairo_sub_path_done_cap);
+ (*cb->done_sub_path) (closure, CAIRO_SUB_PATH_DONE_CAP);
return (*cb->done_path) (closure);
}
-
Index: cairo_path_bounds.c
===================================================================
RCS file: /local/src/CVS/cairo/src/cairo_path_bounds.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- cairo_path_bounds.c 5 Sep 2003 22:29:49 -0000 1.5
+++ cairo_path_bounds.c 27 Sep 2003 12:00:47 -0000 1.6
@@ -152,7 +152,7 @@
_cairo_path_bounder_init (&bounder);
- status = _cairo_path_interpret (path, cairo_path_direction_forward, &cb, &bounder);
+ status = _cairo_path_interpret (path, CAIRO_DIRECTION_FORWARD, &cb, &bounder);
if (status) {
*x1 = *y1 = *x2 = *y2 = 0.0;
_cairo_path_bounder_fini (&bounder);
Index: cairo_path_fill.c
===================================================================
RCS file: /local/src/CVS/cairo/src/cairo_path_fill.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cairo_path_fill.c 26 Aug 2003 14:40:17 -0000 1.4
+++ cairo_path_fill.c 27 Sep 2003 12:00:47 -0000 1.5
@@ -91,7 +91,7 @@
cairo_spline_t spline;
status = _cairo_spline_init (&spline, a, b, c, d);
- if (status == cairo_int_status_degenerate)
+ if (status == CAIRO_INT_STATUS_DEGENERATE)
return CAIRO_STATUS_SUCCESS;
_cairo_spline_decompose (&spline, gstate->tolerance);
@@ -148,7 +148,7 @@
_cairo_filler_init (&filler, gstate, traps);
status = _cairo_path_interpret (path,
- cairo_path_direction_forward,
+ CAIRO_DIRECTION_FORWARD,
&filler_callbacks, &filler);
if (status) {
_cairo_filler_fini (&filler);
Index: cairo_path_stroke.c
===================================================================
RCS file: /local/src/CVS/cairo/src/cairo_path_stroke.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- cairo_path_stroke.c 5 Sep 2003 22:29:49 -0000 1.7
+++ cairo_path_stroke.c 27 Sep 2003 12:00:47 -0000 1.8
@@ -640,7 +640,7 @@
cairo_point_t extra_points[4];
status = _cairo_spline_init (&spline, a, b, c, d);
- if (status == cairo_int_status_degenerate)
+ if (status == CAIRO_INT_STATUS_DEGENERATE)
return CAIRO_STATUS_SUCCESS;
status = _cairo_pen_init_copy (&pen, &gstate->pen_regular);
@@ -700,7 +700,7 @@
cairo_stroker_t *stroker = closure;
switch (done) {
- case cairo_sub_path_done_join:
+ case CAIRO_SUB_PATH_DONE_JOIN:
if (stroker->have_first && stroker->have_prev) {
status = _cairo_stroker_join (stroker, &stroker->prev, &stroker->first);
if (status)
@@ -708,7 +708,7 @@
break;
}
/* fall through... */
- case cairo_sub_path_done_cap:
+ case CAIRO_SUB_PATH_DONE_CAP:
if (stroker->have_first) {
cairo_point_t t;
/* The initial cap needs an outward facing vector. Reverse everything */
@@ -767,7 +767,7 @@
_cairo_stroker_init (&stroker, gstate, traps);
status = _cairo_path_interpret (path,
- cairo_path_direction_forward,
+ CAIRO_DIRECTION_FORWARD,
callbacks, &stroker);
if (status) {
_cairo_stroker_fini (&stroker);
Index: cairo_pen.c
===================================================================
RCS file: /local/src/CVS/cairo/src/cairo_pen.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- cairo_pen.c 5 Sep 2003 22:29:49 -0000 1.7
+++ cairo_pen.c 27 Sep 2003 12:00:47 -0000 1.8
@@ -37,7 +37,7 @@
_pen_vertex_compare (const void *av, const void *bv);
static cairo_status_t
-_cairo_pen_stroke_spline_half (cairo_pen_t *pen, cairo_spline_t *spline, cairo_pen_stroke_direction_t dir, cairo_polygon_t *polygon);
+_cairo_pen_stroke_spline_half (cairo_pen_t *pen, cairo_spline_t *spline, cairo_direction_t dir, cairo_polygon_t *polygon);
cairo_status_t
_cairo_pen_init_empty (cairo_pen_t *pen)
@@ -305,7 +305,7 @@
static cairo_status_t
_cairo_pen_stroke_spline_half (cairo_pen_t *pen,
cairo_spline_t *spline,
- cairo_pen_stroke_direction_t dir,
+ cairo_direction_t dir,
cairo_polygon_t *polygon)
{
int i;
@@ -317,7 +317,7 @@
cairo_point_t *pt = spline->pts;
int num_pts = spline->num_pts;
- if (dir == cairo_pen_stroke_direction_forward) {
+ if (dir == CAIRO_DIRECTION_FORWARD) {
start = 0;
stop = num_pts;
step = 1;
@@ -381,11 +381,11 @@
if (status)
return status;
- status = _cairo_pen_stroke_spline_half (pen, spline, cairo_pen_stroke_direction_forward, &polygon);
+ status = _cairo_pen_stroke_spline_half (pen, spline, CAIRO_DIRECTION_FORWARD, &polygon);
if (status)
return status;
- status = _cairo_pen_stroke_spline_half (pen, spline, cairo_pen_stroke_direction_reverse, &polygon);
+ status = _cairo_pen_stroke_spline_half (pen, spline, CAIRO_DIRECTION_REVERSE, &polygon);
if (status)
return status;
Index: cairo_spline.c
===================================================================
RCS file: /local/src/CVS/cairo/src/cairo_spline.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cairo_spline.c 5 Sep 2003 22:29:49 -0000 1.4
+++ cairo_spline.c 27 Sep 2003 12:00:47 -0000 1.5
@@ -64,7 +64,7 @@
} else if (a->x != d->x || a->y != d->y) {
_cairo_slope_init (&spline->initial_slope, &spline->a, &spline->d);
} else {
- return cairo_int_status_degenerate;
+ return CAIRO_INT_STATUS_DEGENERATE;
}
if (c->x != d->x || c->y != d->y) {
Index: cairoint.h
===================================================================
RCS file: /local/src/CVS/cairo/src/cairoint.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- cairoint.h 25 Sep 2003 22:01:28 -0000 1.19
+++ cairoint.h 27 Sep 2003 12:00:47 -0000 1.20
@@ -129,24 +129,24 @@
from cairo_status_t. Oh well, without that, I'll use this bogus 1000
offset */
typedef enum cairo_int_status {
- cairo_int_status_degenerate = 1000
+ CAIRO_INT_STATUS_DEGENERATE = 1000
} cairo_int_status_t;
typedef enum cairo_path_op {
- cairo_path_op_move_to = 0,
- cairo_path_op_line_to = 1,
- cairo_path_op_curve_to = 2,
- cairo_path_op_close_path = 3
+ CAIRO_PATH_OP_MOVE_TO = 0,
+ CAIRO_PATH_OP_LINE_TO = 1,
+ CAIRO_PATH_OP_CURVE_TO = 2,
+ CAIRO_PATH_OP_CLOSE_PATH = 3
} __attribute__ ((packed)) cairo_path_op_t; /* Don't want 32 bits if we can avoid it. */
-typedef enum cairo_path_direction {
- cairo_path_direction_forward,
- cairo_path_direction_reverse
-} cairo_path_direction_t;
+typedef enum cairo_direction {
+ CAIRO_DIRECTION_FORWARD,
+ CAIRO_DIRECTION_REVERSE
+} cairo_direction_t;
typedef enum cairo_sub_path_done {
- cairo_sub_path_done_cap,
- cairo_sub_path_done_join
+ CAIRO_SUB_PATH_DONE_CAP,
+ CAIRO_SUB_PATH_DONE_JOIN
} cairo_sub_path_done_t;
typedef struct cairo_path_callbacks {
@@ -211,12 +211,6 @@
cairo_point_t *pts;
} cairo_spline_t;
-/* XXX: This can go away once incremental spline tessellation is working */
-typedef enum cairo_pen_stroke_direction {
- cairo_pen_stroke_direction_forward,
- cairo_pen_stroke_direction_reverse
-} cairo_pen_stroke_direction_t;
-
typedef struct _cairo_pen_vertex {
cairo_point_t pt;
@@ -608,6 +602,9 @@
int width,
int height);
+extern cairo_status_t __internal_linkage
+_cairo_gstate_print_svg (cairo_gstate_t *gstate, FILE *f);
+
/* cairo_color.c */
extern void __internal_linkage
_cairo_color_init (cairo_color_t *color);
@@ -675,13 +672,16 @@
extern cairo_status_t __internal_linkage
_cairo_path_interpret (cairo_path_t *path,
- cairo_path_direction_t dir,
+ cairo_direction_t dir,
const cairo_path_callbacks_t *cb,
void *closure);
extern cairo_status_t __internal_linkage
_cairo_path_bounds (cairo_path_t *path, double *x1, double *y1, double *x2, double *y2);
+cairo_status_t
+_cairo_path_print_svg (cairo_path_t *path, FILE *f);
+
/* cairo_path_fill.c */
extern cairo_status_t __internal_linkage
_cairo_path_fill_to_traps (cairo_path_t *path, cairo_gstate_t *gstate, cairo_traps_t *traps);
More information about the Commit
mailing list