mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 01:48:07 +02:00
Fixed some inconsistent tag/typedef names I missed the first time.
This commit is contained in:
parent
dc1e96ae35
commit
84ed2d465f
15 changed files with 154 additions and 149 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2003-07-18 Carl Worth <cworth@east.isi.edu>
|
||||
|
||||
* src/cairo.h: Fixed some inconsistent tag/typedef names that were
|
||||
missed in the great renaming.
|
||||
|
||||
2003-07-18 Carl Worth <cworth@isi.edu>
|
||||
|
||||
* src/cairo.h: Renamed everything from Xr* to cairo_*.
|
||||
|
|
|
|||
|
|
@ -27,23 +27,23 @@
|
|||
|
||||
#include "cairoint.h"
|
||||
|
||||
typedef struct _cairo_path_bounder {
|
||||
typedef struct cairo_path_bounder {
|
||||
int has_pt;
|
||||
|
||||
XFixed min_x;
|
||||
XFixed min_y;
|
||||
XFixed max_x;
|
||||
XFixed max_y;
|
||||
} cairo_path_bounder;
|
||||
} cairo_path_bounder_t;
|
||||
|
||||
static void
|
||||
_cairo_path_bounder_init (cairo_path_bounder *bounder);
|
||||
_cairo_path_bounder_init (cairo_path_bounder_t *bounder);
|
||||
|
||||
static void
|
||||
_cairo_path_bounder_fini (cairo_path_bounder *bounder);
|
||||
_cairo_path_bounder_fini (cairo_path_bounder_t *bounder);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_path_bounder_add_point (cairo_path_bounder *bounder, XPointFixed *pt);
|
||||
_cairo_path_bounder_add_point (cairo_path_bounder_t *bounder, XPointFixed *pt);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_path_bounder_add_edge (void *closure, XPointFixed *p1, XPointFixed *p2);
|
||||
|
|
@ -53,25 +53,25 @@ _cairo_path_bounder_add_spline (void *closure,
|
|||
XPointFixed *a, XPointFixed *b, XPointFixed *c, XPointFixed *d);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_path_bounder_done_sub_path (void *closure, cairo_sub_path_done done);
|
||||
_cairo_path_bounder_done_sub_path (void *closure, cairo_sub_path_done_t done);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_path_bounder_done_path (void *closure);
|
||||
|
||||
static void
|
||||
_cairo_path_bounder_init (cairo_path_bounder *bounder)
|
||||
_cairo_path_bounder_init (cairo_path_bounder_t *bounder)
|
||||
{
|
||||
bounder->has_pt = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
_cairo_path_bounder_fini (cairo_path_bounder *bounder)
|
||||
_cairo_path_bounder_fini (cairo_path_bounder_t *bounder)
|
||||
{
|
||||
bounder->has_pt = 0;
|
||||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_path_bounder_add_point (cairo_path_bounder *bounder, XPointFixed *pt)
|
||||
_cairo_path_bounder_add_point (cairo_path_bounder_t *bounder, XPointFixed *pt)
|
||||
{
|
||||
if (bounder->has_pt) {
|
||||
if (pt->x < bounder->min_x)
|
||||
|
|
@ -100,7 +100,7 @@ _cairo_path_bounder_add_point (cairo_path_bounder *bounder, XPointFixed *pt)
|
|||
static cairo_status_t
|
||||
_cairo_path_bounder_add_edge (void *closure, XPointFixed *p1, XPointFixed *p2)
|
||||
{
|
||||
cairo_path_bounder *bounder = closure;
|
||||
cairo_path_bounder_t *bounder = closure;
|
||||
|
||||
_cairo_path_bounder_add_point (bounder, p1);
|
||||
_cairo_path_bounder_add_point (bounder, p2);
|
||||
|
|
@ -112,7 +112,7 @@ static cairo_status_t
|
|||
_cairo_path_bounder_add_spline (void *closure,
|
||||
XPointFixed *a, XPointFixed *b, XPointFixed *c, XPointFixed *d)
|
||||
{
|
||||
cairo_path_bounder *bounder = closure;
|
||||
cairo_path_bounder_t *bounder = closure;
|
||||
|
||||
_cairo_path_bounder_add_point (bounder, a);
|
||||
_cairo_path_bounder_add_point (bounder, b);
|
||||
|
|
@ -123,7 +123,7 @@ _cairo_path_bounder_add_spline (void *closure,
|
|||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_path_bounder_done_sub_path (void *closure, cairo_sub_path_done done)
|
||||
_cairo_path_bounder_done_sub_path (void *closure, cairo_sub_path_done_t done)
|
||||
{
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
@ -146,7 +146,7 @@ _cairo_path_bounds (cairo_path_t *path, double *x1, double *y1, double *x2, doub
|
|||
_cairo_path_bounder_done_path
|
||||
};
|
||||
|
||||
cairo_path_bounder bounder;
|
||||
cairo_path_bounder_t bounder;
|
||||
|
||||
_cairo_path_bounder_init (&bounder);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,18 +27,18 @@
|
|||
|
||||
#include "cairoint.h"
|
||||
|
||||
typedef struct _cairo_filler {
|
||||
typedef struct cairo_filler {
|
||||
cairo_gstate_t *gstate;
|
||||
cairo_traps_t *traps;
|
||||
|
||||
cairo_polygon_t polygon;
|
||||
} cairo_filler;
|
||||
} cairo_filler_t;
|
||||
|
||||
static void
|
||||
_cairo_filler_init (cairo_filler *filler, cairo_gstate_t *gstate, cairo_traps_t *traps);
|
||||
_cairo_filler_init (cairo_filler_t *filler, cairo_gstate_t *gstate, cairo_traps_t *traps);
|
||||
|
||||
static void
|
||||
_cairo_filler_fini (cairo_filler *filler);
|
||||
_cairo_filler_fini (cairo_filler_t *filler);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_filler_add_edge (void *closure, XPointFixed *p1, XPointFixed *p2);
|
||||
|
|
@ -47,13 +47,13 @@ static cairo_status_t
|
|||
_cairo_filler_add_spline (void *closure, XPointFixed *a, XPointFixed *b, XPointFixed *c, XPointFixed *d);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_filler_done_sub_path (void *closure, cairo_sub_path_done done);
|
||||
_cairo_filler_done_sub_path (void *closure, cairo_sub_path_done_t done);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_filler_done_path (void *closure);
|
||||
|
||||
static void
|
||||
_cairo_filler_init (cairo_filler *filler, cairo_gstate_t *gstate, cairo_traps_t *traps)
|
||||
_cairo_filler_init (cairo_filler_t *filler, cairo_gstate_t *gstate, cairo_traps_t *traps)
|
||||
{
|
||||
filler->gstate = gstate;
|
||||
filler->traps = traps;
|
||||
|
|
@ -62,7 +62,7 @@ _cairo_filler_init (cairo_filler *filler, cairo_gstate_t *gstate, cairo_traps_t
|
|||
}
|
||||
|
||||
static void
|
||||
_cairo_filler_fini (cairo_filler *filler)
|
||||
_cairo_filler_fini (cairo_filler_t *filler)
|
||||
{
|
||||
_cairo_polygon_fini (&filler->polygon);
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ _cairo_filler_fini (cairo_filler *filler)
|
|||
static cairo_status_t
|
||||
_cairo_filler_add_edge (void *closure, XPointFixed *p1, XPointFixed *p2)
|
||||
{
|
||||
cairo_filler *filler = closure;
|
||||
cairo_filler_t *filler = closure;
|
||||
cairo_polygon_t *polygon = &filler->polygon;
|
||||
|
||||
return _cairo_polygon_add_edge (polygon, p1, p2);
|
||||
|
|
@ -81,7 +81,7 @@ _cairo_filler_add_spline (void *closure, XPointFixed *a, XPointFixed *b, XPointF
|
|||
{
|
||||
int i;
|
||||
cairo_status_t status = CAIRO_STATUS_SUCCESS;
|
||||
cairo_filler *filler = closure;
|
||||
cairo_filler_t *filler = closure;
|
||||
cairo_polygon_t *polygon = &filler->polygon;
|
||||
cairo_gstate_t *gstate = filler->gstate;
|
||||
cairo_spline_t spline;
|
||||
|
|
@ -107,10 +107,10 @@ _cairo_filler_add_spline (void *closure, XPointFixed *a, XPointFixed *b, XPointF
|
|||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_filler_done_sub_path (void *closure, cairo_sub_path_done done)
|
||||
_cairo_filler_done_sub_path (void *closure, cairo_sub_path_done_t done)
|
||||
{
|
||||
cairo_status_t status = CAIRO_STATUS_SUCCESS;
|
||||
cairo_filler *filler = closure;
|
||||
cairo_filler_t *filler = closure;
|
||||
cairo_polygon_t *polygon = &filler->polygon;
|
||||
|
||||
_cairo_polygon_close (polygon);
|
||||
|
|
@ -121,7 +121,7 @@ _cairo_filler_done_sub_path (void *closure, cairo_sub_path_done done)
|
|||
static cairo_status_t
|
||||
_cairo_filler_done_path (void *closure)
|
||||
{
|
||||
cairo_filler *filler = closure;
|
||||
cairo_filler_t *filler = closure;
|
||||
|
||||
return cairo_traps_tessellate_polygon (filler->traps,
|
||||
&filler->polygon,
|
||||
|
|
@ -139,7 +139,7 @@ _cairo_path_fill_to_traps (cairo_path_t *path, cairo_gstate_t *gstate, cairo_tra
|
|||
};
|
||||
|
||||
cairo_status_t status;
|
||||
cairo_filler filler;
|
||||
cairo_filler_t filler;
|
||||
|
||||
_cairo_filler_init (&filler, gstate, traps);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "cairoint.h"
|
||||
|
||||
typedef struct _cairo_stroker {
|
||||
typedef struct cairo_stroker {
|
||||
cairo_gstate_t *gstate;
|
||||
cairo_traps_t *traps;
|
||||
|
||||
|
|
@ -39,14 +39,14 @@ typedef struct _cairo_stroker {
|
|||
int dash_index;
|
||||
int dash_on;
|
||||
double dash_remain;
|
||||
} cairo_stroker;
|
||||
} cairo_stroker_t;
|
||||
|
||||
/* private functions */
|
||||
static void
|
||||
_cairo_stroker_init (cairo_stroker *stroker, cairo_gstate_t *gstate, cairo_traps_t *traps);
|
||||
_cairo_stroker_init (cairo_stroker_t *stroker, cairo_gstate_t *gstate, cairo_traps_t *traps);
|
||||
|
||||
static void
|
||||
_cairo_stroker_fini (cairo_stroker *stroker);
|
||||
_cairo_stroker_fini (cairo_stroker_t *stroker);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_add_edge (void *closure, XPointFixed *p1, XPointFixed *p2);
|
||||
|
|
@ -58,7 +58,7 @@ static cairo_status_t
|
|||
_cairo_stroker_add_spline (void *closure, XPointFixed *a, XPointFixed *b, XPointFixed *c, XPointFixed *d);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_done_sub_path (void *closure, cairo_sub_path_done done);
|
||||
_cairo_stroker_done_sub_path (void *closure, cairo_sub_path_done_t done);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_done_path (void *closure);
|
||||
|
|
@ -70,10 +70,10 @@ static int
|
|||
_cairo_stroker_face_clockwise (cairo_stroke_face_t *in, cairo_stroke_face_t *out);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_join (cairo_stroker *stroker, cairo_stroke_face_t *in, cairo_stroke_face_t *out);
|
||||
_cairo_stroker_join (cairo_stroker_t *stroker, cairo_stroke_face_t *in, cairo_stroke_face_t *out);
|
||||
|
||||
static void
|
||||
_cairo_stroker_start_dash (cairo_stroker *stroker)
|
||||
_cairo_stroker_start_dash (cairo_stroker_t *stroker)
|
||||
{
|
||||
cairo_gstate_t *gstate = stroker->gstate;
|
||||
double offset;
|
||||
|
|
@ -93,7 +93,7 @@ _cairo_stroker_start_dash (cairo_stroker *stroker)
|
|||
}
|
||||
|
||||
static void
|
||||
_cairo_stroker_step_dash (cairo_stroker *stroker, double step)
|
||||
_cairo_stroker_step_dash (cairo_stroker_t *stroker, double step)
|
||||
{
|
||||
cairo_gstate_t *gstate = stroker->gstate;
|
||||
stroker->dash_remain -= step;
|
||||
|
|
@ -107,7 +107,7 @@ _cairo_stroker_step_dash (cairo_stroker *stroker, double step)
|
|||
}
|
||||
|
||||
static void
|
||||
_cairo_stroker_init (cairo_stroker *stroker, cairo_gstate_t *gstate, cairo_traps_t *traps)
|
||||
_cairo_stroker_init (cairo_stroker_t *stroker, cairo_gstate_t *gstate, cairo_traps_t *traps)
|
||||
{
|
||||
stroker->gstate = gstate;
|
||||
stroker->traps = traps;
|
||||
|
|
@ -119,7 +119,7 @@ _cairo_stroker_init (cairo_stroker *stroker, cairo_gstate_t *gstate, cairo_traps
|
|||
}
|
||||
|
||||
static void
|
||||
_cairo_stroker_fini (cairo_stroker *stroker)
|
||||
_cairo_stroker_fini (cairo_stroker_t *stroker)
|
||||
{
|
||||
/* nothing to do here */
|
||||
}
|
||||
|
|
@ -145,7 +145,7 @@ _cairo_stroker_face_clockwise (cairo_stroke_face_t *in, cairo_stroke_face_t *out
|
|||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_join (cairo_stroker *stroker, cairo_stroke_face_t *in, cairo_stroke_face_t *out)
|
||||
_cairo_stroker_join (cairo_stroker_t *stroker, cairo_stroke_face_t *in, cairo_stroke_face_t *out)
|
||||
{
|
||||
cairo_status_t status;
|
||||
cairo_gstate_t *gstate = stroker->gstate;
|
||||
|
|
@ -267,7 +267,7 @@ _cairo_stroker_join (cairo_stroker *stroker, cairo_stroke_face_t *in, cairo_stro
|
|||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_cap (cairo_stroker *stroker, cairo_stroke_face_t *f)
|
||||
_cairo_stroker_cap (cairo_stroker_t *stroker, cairo_stroke_face_t *f)
|
||||
{
|
||||
cairo_status_t status;
|
||||
cairo_gstate_t *gstate = stroker->gstate;
|
||||
|
|
@ -388,7 +388,7 @@ _compute_face (XPointFixed *pt, cairo_slope_fixed_t *slope, cairo_gstate_t *gsta
|
|||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_add_sub_edge (cairo_stroker *stroker, XPointFixed *p1, XPointFixed *p2,
|
||||
_cairo_stroker_add_sub_edge (cairo_stroker_t *stroker, XPointFixed *p1, XPointFixed *p2,
|
||||
cairo_stroke_face_t *start, cairo_stroke_face_t *end)
|
||||
{
|
||||
cairo_gstate_t *gstate = stroker->gstate;
|
||||
|
|
@ -422,7 +422,7 @@ static cairo_status_t
|
|||
_cairo_stroker_add_edge (void *closure, XPointFixed *p1, XPointFixed *p2)
|
||||
{
|
||||
cairo_status_t status;
|
||||
cairo_stroker *stroker = closure;
|
||||
cairo_stroker_t *stroker = closure;
|
||||
cairo_stroke_face_t start, end;
|
||||
|
||||
if (p1->x == p2->x && p1->y == p2->y) {
|
||||
|
|
@ -461,7 +461,7 @@ static cairo_status_t
|
|||
_cairo_stroker_add_edge_dashed (void *closure, XPointFixed *p1, XPointFixed *p2)
|
||||
{
|
||||
cairo_status_t status = CAIRO_STATUS_SUCCESS;
|
||||
cairo_stroker *stroker = closure;
|
||||
cairo_stroker_t *stroker = closure;
|
||||
cairo_gstate_t *gstate = stroker->gstate;
|
||||
double mag, remain, tmp;
|
||||
double dx, dy;
|
||||
|
|
@ -567,7 +567,7 @@ static cairo_status_t
|
|||
_cairo_stroker_add_spline (void *closure, XPointFixed *a, XPointFixed *b, XPointFixed *c, XPointFixed *d)
|
||||
{
|
||||
cairo_status_t status = CAIRO_STATUS_SUCCESS;
|
||||
cairo_stroker *stroker = closure;
|
||||
cairo_stroker_t *stroker = closure;
|
||||
cairo_gstate_t *gstate = stroker->gstate;
|
||||
cairo_spline_t spline;
|
||||
cairo_pen_t pen;
|
||||
|
|
@ -629,10 +629,10 @@ _cairo_stroker_add_spline (void *closure, XPointFixed *a, XPointFixed *b, XPoint
|
|||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_done_sub_path (void *closure, cairo_sub_path_done done)
|
||||
_cairo_stroker_done_sub_path (void *closure, cairo_sub_path_done_t done)
|
||||
{
|
||||
cairo_status_t status;
|
||||
cairo_stroker *stroker = closure;
|
||||
cairo_stroker_t *stroker = closure;
|
||||
|
||||
switch (done) {
|
||||
case cairo_sub_path_done_join:
|
||||
|
|
@ -697,7 +697,7 @@ _cairo_path_stroke_to_traps (cairo_path_t *path, cairo_gstate_t *gstate, cairo_t
|
|||
const cairo_path_callbacks_t *callbacks = gstate->dash ? &stroker_dashed_cb : &stroker_solid_cb;
|
||||
|
||||
cairo_status_t status;
|
||||
cairo_stroker stroker;
|
||||
cairo_stroker_t stroker;
|
||||
|
||||
_cairo_stroker_init (&stroker, gstate, traps);
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
/* private functions */
|
||||
static cairo_status_t
|
||||
_cairo_path_add (cairo_path_t *path, cairo_path_op op, XPointFixed *pts, int num_pts);
|
||||
_cairo_path_add (cairo_path_t *path, cairo_path_op_t op, XPointFixed *pts, int num_pts);
|
||||
|
||||
static void
|
||||
_cairo_path_add_op_buf (cairo_path_t *path, cairo_path_op_buf_t *op);
|
||||
|
|
@ -51,7 +51,7 @@ static void
|
|||
_cairo_path_op_buf_destroy (cairo_path_op_buf_t *buf);
|
||||
|
||||
static void
|
||||
_cairo_path_op_buf_add (cairo_path_op_buf_t *op_buf, cairo_path_op op);
|
||||
_cairo_path_op_buf_add (cairo_path_op_buf_t *op_buf, cairo_path_op_t op);
|
||||
|
||||
static cairo_path_arg_buf_t *
|
||||
_cairo_path_arg_buf_create (void);
|
||||
|
|
@ -171,7 +171,7 @@ _cairo_path_close_path (cairo_path_t *path)
|
|||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_path_add (cairo_path_t *path, cairo_path_op op, XPointFixed *pts, int num_pts)
|
||||
_cairo_path_add (cairo_path_t *path, cairo_path_op_t op, XPointFixed *pts, int num_pts)
|
||||
{
|
||||
cairo_status_t status;
|
||||
|
||||
|
|
@ -273,7 +273,7 @@ _cairo_path_op_buf_destroy (cairo_path_op_buf_t *op)
|
|||
}
|
||||
|
||||
static void
|
||||
_cairo_path_op_buf_add (cairo_path_op_buf_t *op_buf, cairo_path_op op)
|
||||
_cairo_path_op_buf_add (cairo_path_op_buf_t *op_buf, cairo_path_op_t op)
|
||||
{
|
||||
op_buf->op[op_buf->num_ops++] = op;
|
||||
}
|
||||
|
|
@ -320,12 +320,12 @@ static int num_args[] =
|
|||
};
|
||||
|
||||
cairo_status_t
|
||||
_cairo_path_interpret (cairo_path_t *path, cairo_path_direction dir, const cairo_path_callbacks_t *cb, void *closure)
|
||||
_cairo_path_interpret (cairo_path_t *path, cairo_path_direction_t dir, const cairo_path_callbacks_t *cb, void *closure)
|
||||
{
|
||||
cairo_status_t status;
|
||||
int i, arg;
|
||||
cairo_path_op_buf_t *op_buf;
|
||||
cairo_path_op op;
|
||||
cairo_path_op_t op;
|
||||
cairo_path_arg_buf_t *arg_buf = path->arg_head;
|
||||
int buf_i = 0;
|
||||
XPointFixed pt[CAIRO_PATH_OP_MAX_ARGS];
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ cairo_status_t
|
|||
_cairo_pen_init (cairo_pen_t *pen, double radius, cairo_gstate_t *gstate)
|
||||
{
|
||||
int i;
|
||||
cairo_pen_vertex *v;
|
||||
cairo_pen_vertex_t *v;
|
||||
double dx, dy;
|
||||
|
||||
if (pen->num_vertices) {
|
||||
|
|
@ -81,7 +81,7 @@ _cairo_pen_init (cairo_pen_t *pen, double radius, cairo_gstate_t *gstate)
|
|||
if (pen->num_vertices % 2)
|
||||
pen->num_vertices++;
|
||||
|
||||
pen->vertex = malloc (pen->num_vertices * sizeof (cairo_pen_vertex));
|
||||
pen->vertex = malloc (pen->num_vertices * sizeof (cairo_pen_vertex_t));
|
||||
if (pen->vertex == NULL) {
|
||||
return CAIRO_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
|
@ -118,11 +118,11 @@ _cairo_pen_init_copy (cairo_pen_t *pen, cairo_pen_t *other)
|
|||
*pen = *other;
|
||||
|
||||
if (pen->num_vertices) {
|
||||
pen->vertex = malloc (pen->num_vertices * sizeof (cairo_pen_vertex));
|
||||
pen->vertex = malloc (pen->num_vertices * sizeof (cairo_pen_vertex_t));
|
||||
if (pen->vertex == NULL) {
|
||||
return CAIRO_STATUS_NO_MEMORY;
|
||||
}
|
||||
memcpy (pen->vertex, other->vertex, pen->num_vertices * sizeof (cairo_pen_vertex));
|
||||
memcpy (pen->vertex, other->vertex, pen->num_vertices * sizeof (cairo_pen_vertex_t));
|
||||
}
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
|
@ -132,8 +132,8 @@ static int
|
|||
_cairo_pen_vertex_compare_by_theta (const void *a, const void *b)
|
||||
{
|
||||
double diff;
|
||||
const cairo_pen_vertex *va = a;
|
||||
const cairo_pen_vertex *vb = b;
|
||||
const cairo_pen_vertex_t *va = a;
|
||||
const cairo_pen_vertex_t *vb = b;
|
||||
|
||||
diff = va->theta - vb->theta;
|
||||
if (diff < 0)
|
||||
|
|
@ -148,10 +148,10 @@ cairo_status_t
|
|||
_cairo_pen_add_points (cairo_pen_t *pen, XPointFixed *pt, int num_pts)
|
||||
{
|
||||
int i, j;
|
||||
cairo_pen_vertex *v, *v_next, *new_vertex;
|
||||
cairo_pen_vertex_t *v, *v_next, *new_vertex;
|
||||
|
||||
pen->num_vertices += num_pts;
|
||||
new_vertex = realloc (pen->vertex, pen->num_vertices * sizeof (cairo_pen_vertex));
|
||||
new_vertex = realloc (pen->vertex, pen->num_vertices * sizeof (cairo_pen_vertex_t));
|
||||
if (new_vertex == NULL) {
|
||||
pen->num_vertices -= num_pts;
|
||||
return CAIRO_STATUS_NO_MEMORY;
|
||||
|
|
@ -167,7 +167,7 @@ _cairo_pen_add_points (cairo_pen_t *pen, XPointFixed *pt, int num_pts)
|
|||
v->theta += 2 * M_PI;
|
||||
}
|
||||
|
||||
qsort (pen->vertex, pen->num_vertices, sizeof (cairo_pen_vertex), _cairo_pen_vertex_compare_by_theta);
|
||||
qsort (pen->vertex, pen->num_vertices, sizeof (cairo_pen_vertex_t), _cairo_pen_vertex_compare_by_theta);
|
||||
|
||||
/* eliminate any duplicate vertices */
|
||||
for (i=0; i < pen->num_vertices - 1; i++ ) {
|
||||
|
|
@ -210,7 +210,7 @@ static void
|
|||
_cairo_pen_compute_slopes (cairo_pen_t *pen)
|
||||
{
|
||||
int i, i_prev;
|
||||
cairo_pen_vertex *prev, *v, *next;
|
||||
cairo_pen_vertex_t *prev, *v, *next;
|
||||
|
||||
for (i=0, i_prev = pen->num_vertices - 1;
|
||||
i < pen->num_vertices;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ _cairo_spline_decompose_into (cairo_spline_t *spline, double tolerance_squared,
|
|||
|
||||
#define CAIRO_SPLINE_GROWTH_INC 100
|
||||
|
||||
cairo_int_status
|
||||
cairo_int_status_t
|
||||
_cairo_spline_init (cairo_spline_t *spline, XPointFixed *a, XPointFixed *b, XPointFixed *c, XPointFixed *d)
|
||||
{
|
||||
spline->a = *a;
|
||||
|
|
|
|||
18
src/cairo.h
18
src/cairo.h
|
|
@ -31,8 +31,8 @@
|
|||
#include <Xc.h>
|
||||
|
||||
typedef struct cairo cairo_t;
|
||||
typedef struct cairo_surface_t cairo_surface_t;
|
||||
typedef struct cairo_matrix_t cairo_matrix_t;
|
||||
typedef struct cairo_surface cairo_surface_t;
|
||||
typedef struct cairo_matrix cairo_matrix_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -63,7 +63,7 @@ cairo_pop_group (cairo_t *cr);
|
|||
void
|
||||
cairo_set_target_surface (cairo_t *cr, cairo_surface_t *surface);
|
||||
|
||||
typedef enum cairo_format_t {
|
||||
typedef enum cairo_format {
|
||||
CAIRO_FORMAT_ARGB32 = PictStandardARGB32,
|
||||
CAIRO_FORMAT_RGB24 = PictStandardRGB24,
|
||||
CAIRO_FORMAT_A8 = PictStandardA8,
|
||||
|
|
@ -83,7 +83,7 @@ cairo_set_target_image (cairo_t *cr,
|
|||
int height,
|
||||
int stride);
|
||||
|
||||
typedef enum cairo_operator_t {
|
||||
typedef enum cairo_operator {
|
||||
CAIRO_OPERATOR_CLEAR = PictOpClear,
|
||||
CAIRO_OPERATOR_SRC = PictOpSrc,
|
||||
CAIRO_OPERATOR_DST = PictOpDst,
|
||||
|
|
@ -143,7 +143,7 @@ cairo_set_tolerance (cairo_t *cr, double tolerance);
|
|||
void
|
||||
cairo_set_alpha (cairo_t *cr, double alpha);
|
||||
|
||||
typedef enum cairo_fill_rule_t {
|
||||
typedef enum cairo_fill_rule {
|
||||
CAIRO_FILL_RULE_WINDING,
|
||||
CAIRO_FILL_RULE_EVEN_ODD
|
||||
} cairo_fill_rule_t;
|
||||
|
|
@ -154,7 +154,7 @@ cairo_set_fill_rule (cairo_t *cr, cairo_fill_rule_t fill_rule);
|
|||
void
|
||||
cairo_set_line_width (cairo_t *cr, double width);
|
||||
|
||||
typedef enum cairo_line_cap_t {
|
||||
typedef enum cairo_line_cap {
|
||||
CAIRO_LINE_CAP_BUTT,
|
||||
CAIRO_LINE_CAP_ROUND,
|
||||
CAIRO_LINE_CAP_SQUARE
|
||||
|
|
@ -163,7 +163,7 @@ typedef enum cairo_line_cap_t {
|
|||
void
|
||||
cairo_set_line_cap (cairo_t *cr, cairo_line_cap_t line_cap);
|
||||
|
||||
typedef enum cairo_line_join_t {
|
||||
typedef enum cairo_line_join {
|
||||
CAIRO_LINE_JOIN_MITER,
|
||||
CAIRO_LINE_JOIN_ROUND,
|
||||
CAIRO_LINE_JOIN_BEVEL
|
||||
|
|
@ -345,7 +345,7 @@ cairo_get_target_surface (cairo_t *cr);
|
|||
|
||||
/* Error status queries */
|
||||
|
||||
typedef enum cairo_status_t {
|
||||
typedef enum cairo_status {
|
||||
CAIRO_STATUS_SUCCESS = 0,
|
||||
CAIRO_STATUS_NO_MEMORY,
|
||||
CAIRO_STATUS_INVALID_RESTORE,
|
||||
|
|
@ -428,7 +428,7 @@ cairo_surface_set_matrix (cairo_surface_t *surface, cairo_matrix_t *matrix);
|
|||
cairo_status_t
|
||||
cairo_surface_get_matrix (cairo_surface_t *surface, cairo_matrix_t *matrix);
|
||||
|
||||
typedef enum cairo_filter_t {
|
||||
typedef enum cairo_filter {
|
||||
CAIRO_FILTER_FAST = XcFilterFast,
|
||||
CAIRO_FILTER_GOOD = XcFilterGood,
|
||||
CAIRO_FILTER_BEST = XcFilterBest,
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
/* private functions */
|
||||
static cairo_status_t
|
||||
_cairo_path_add (cairo_path_t *path, cairo_path_op op, XPointFixed *pts, int num_pts);
|
||||
_cairo_path_add (cairo_path_t *path, cairo_path_op_t op, XPointFixed *pts, int num_pts);
|
||||
|
||||
static void
|
||||
_cairo_path_add_op_buf (cairo_path_t *path, cairo_path_op_buf_t *op);
|
||||
|
|
@ -51,7 +51,7 @@ static void
|
|||
_cairo_path_op_buf_destroy (cairo_path_op_buf_t *buf);
|
||||
|
||||
static void
|
||||
_cairo_path_op_buf_add (cairo_path_op_buf_t *op_buf, cairo_path_op op);
|
||||
_cairo_path_op_buf_add (cairo_path_op_buf_t *op_buf, cairo_path_op_t op);
|
||||
|
||||
static cairo_path_arg_buf_t *
|
||||
_cairo_path_arg_buf_create (void);
|
||||
|
|
@ -171,7 +171,7 @@ _cairo_path_close_path (cairo_path_t *path)
|
|||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_path_add (cairo_path_t *path, cairo_path_op op, XPointFixed *pts, int num_pts)
|
||||
_cairo_path_add (cairo_path_t *path, cairo_path_op_t op, XPointFixed *pts, int num_pts)
|
||||
{
|
||||
cairo_status_t status;
|
||||
|
||||
|
|
@ -273,7 +273,7 @@ _cairo_path_op_buf_destroy (cairo_path_op_buf_t *op)
|
|||
}
|
||||
|
||||
static void
|
||||
_cairo_path_op_buf_add (cairo_path_op_buf_t *op_buf, cairo_path_op op)
|
||||
_cairo_path_op_buf_add (cairo_path_op_buf_t *op_buf, cairo_path_op_t op)
|
||||
{
|
||||
op_buf->op[op_buf->num_ops++] = op;
|
||||
}
|
||||
|
|
@ -320,12 +320,12 @@ static int num_args[] =
|
|||
};
|
||||
|
||||
cairo_status_t
|
||||
_cairo_path_interpret (cairo_path_t *path, cairo_path_direction dir, const cairo_path_callbacks_t *cb, void *closure)
|
||||
_cairo_path_interpret (cairo_path_t *path, cairo_path_direction_t dir, const cairo_path_callbacks_t *cb, void *closure)
|
||||
{
|
||||
cairo_status_t status;
|
||||
int i, arg;
|
||||
cairo_path_op_buf_t *op_buf;
|
||||
cairo_path_op op;
|
||||
cairo_path_op_t op;
|
||||
cairo_path_arg_buf_t *arg_buf = path->arg_head;
|
||||
int buf_i = 0;
|
||||
XPointFixed pt[CAIRO_PATH_OP_MAX_ARGS];
|
||||
|
|
|
|||
|
|
@ -27,23 +27,23 @@
|
|||
|
||||
#include "cairoint.h"
|
||||
|
||||
typedef struct _cairo_path_bounder {
|
||||
typedef struct cairo_path_bounder {
|
||||
int has_pt;
|
||||
|
||||
XFixed min_x;
|
||||
XFixed min_y;
|
||||
XFixed max_x;
|
||||
XFixed max_y;
|
||||
} cairo_path_bounder;
|
||||
} cairo_path_bounder_t;
|
||||
|
||||
static void
|
||||
_cairo_path_bounder_init (cairo_path_bounder *bounder);
|
||||
_cairo_path_bounder_init (cairo_path_bounder_t *bounder);
|
||||
|
||||
static void
|
||||
_cairo_path_bounder_fini (cairo_path_bounder *bounder);
|
||||
_cairo_path_bounder_fini (cairo_path_bounder_t *bounder);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_path_bounder_add_point (cairo_path_bounder *bounder, XPointFixed *pt);
|
||||
_cairo_path_bounder_add_point (cairo_path_bounder_t *bounder, XPointFixed *pt);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_path_bounder_add_edge (void *closure, XPointFixed *p1, XPointFixed *p2);
|
||||
|
|
@ -53,25 +53,25 @@ _cairo_path_bounder_add_spline (void *closure,
|
|||
XPointFixed *a, XPointFixed *b, XPointFixed *c, XPointFixed *d);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_path_bounder_done_sub_path (void *closure, cairo_sub_path_done done);
|
||||
_cairo_path_bounder_done_sub_path (void *closure, cairo_sub_path_done_t done);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_path_bounder_done_path (void *closure);
|
||||
|
||||
static void
|
||||
_cairo_path_bounder_init (cairo_path_bounder *bounder)
|
||||
_cairo_path_bounder_init (cairo_path_bounder_t *bounder)
|
||||
{
|
||||
bounder->has_pt = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
_cairo_path_bounder_fini (cairo_path_bounder *bounder)
|
||||
_cairo_path_bounder_fini (cairo_path_bounder_t *bounder)
|
||||
{
|
||||
bounder->has_pt = 0;
|
||||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_path_bounder_add_point (cairo_path_bounder *bounder, XPointFixed *pt)
|
||||
_cairo_path_bounder_add_point (cairo_path_bounder_t *bounder, XPointFixed *pt)
|
||||
{
|
||||
if (bounder->has_pt) {
|
||||
if (pt->x < bounder->min_x)
|
||||
|
|
@ -100,7 +100,7 @@ _cairo_path_bounder_add_point (cairo_path_bounder *bounder, XPointFixed *pt)
|
|||
static cairo_status_t
|
||||
_cairo_path_bounder_add_edge (void *closure, XPointFixed *p1, XPointFixed *p2)
|
||||
{
|
||||
cairo_path_bounder *bounder = closure;
|
||||
cairo_path_bounder_t *bounder = closure;
|
||||
|
||||
_cairo_path_bounder_add_point (bounder, p1);
|
||||
_cairo_path_bounder_add_point (bounder, p2);
|
||||
|
|
@ -112,7 +112,7 @@ static cairo_status_t
|
|||
_cairo_path_bounder_add_spline (void *closure,
|
||||
XPointFixed *a, XPointFixed *b, XPointFixed *c, XPointFixed *d)
|
||||
{
|
||||
cairo_path_bounder *bounder = closure;
|
||||
cairo_path_bounder_t *bounder = closure;
|
||||
|
||||
_cairo_path_bounder_add_point (bounder, a);
|
||||
_cairo_path_bounder_add_point (bounder, b);
|
||||
|
|
@ -123,7 +123,7 @@ _cairo_path_bounder_add_spline (void *closure,
|
|||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_path_bounder_done_sub_path (void *closure, cairo_sub_path_done done)
|
||||
_cairo_path_bounder_done_sub_path (void *closure, cairo_sub_path_done_t done)
|
||||
{
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
@ -146,7 +146,7 @@ _cairo_path_bounds (cairo_path_t *path, double *x1, double *y1, double *x2, doub
|
|||
_cairo_path_bounder_done_path
|
||||
};
|
||||
|
||||
cairo_path_bounder bounder;
|
||||
cairo_path_bounder_t bounder;
|
||||
|
||||
_cairo_path_bounder_init (&bounder);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,18 +27,18 @@
|
|||
|
||||
#include "cairoint.h"
|
||||
|
||||
typedef struct _cairo_filler {
|
||||
typedef struct cairo_filler {
|
||||
cairo_gstate_t *gstate;
|
||||
cairo_traps_t *traps;
|
||||
|
||||
cairo_polygon_t polygon;
|
||||
} cairo_filler;
|
||||
} cairo_filler_t;
|
||||
|
||||
static void
|
||||
_cairo_filler_init (cairo_filler *filler, cairo_gstate_t *gstate, cairo_traps_t *traps);
|
||||
_cairo_filler_init (cairo_filler_t *filler, cairo_gstate_t *gstate, cairo_traps_t *traps);
|
||||
|
||||
static void
|
||||
_cairo_filler_fini (cairo_filler *filler);
|
||||
_cairo_filler_fini (cairo_filler_t *filler);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_filler_add_edge (void *closure, XPointFixed *p1, XPointFixed *p2);
|
||||
|
|
@ -47,13 +47,13 @@ static cairo_status_t
|
|||
_cairo_filler_add_spline (void *closure, XPointFixed *a, XPointFixed *b, XPointFixed *c, XPointFixed *d);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_filler_done_sub_path (void *closure, cairo_sub_path_done done);
|
||||
_cairo_filler_done_sub_path (void *closure, cairo_sub_path_done_t done);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_filler_done_path (void *closure);
|
||||
|
||||
static void
|
||||
_cairo_filler_init (cairo_filler *filler, cairo_gstate_t *gstate, cairo_traps_t *traps)
|
||||
_cairo_filler_init (cairo_filler_t *filler, cairo_gstate_t *gstate, cairo_traps_t *traps)
|
||||
{
|
||||
filler->gstate = gstate;
|
||||
filler->traps = traps;
|
||||
|
|
@ -62,7 +62,7 @@ _cairo_filler_init (cairo_filler *filler, cairo_gstate_t *gstate, cairo_traps_t
|
|||
}
|
||||
|
||||
static void
|
||||
_cairo_filler_fini (cairo_filler *filler)
|
||||
_cairo_filler_fini (cairo_filler_t *filler)
|
||||
{
|
||||
_cairo_polygon_fini (&filler->polygon);
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ _cairo_filler_fini (cairo_filler *filler)
|
|||
static cairo_status_t
|
||||
_cairo_filler_add_edge (void *closure, XPointFixed *p1, XPointFixed *p2)
|
||||
{
|
||||
cairo_filler *filler = closure;
|
||||
cairo_filler_t *filler = closure;
|
||||
cairo_polygon_t *polygon = &filler->polygon;
|
||||
|
||||
return _cairo_polygon_add_edge (polygon, p1, p2);
|
||||
|
|
@ -81,7 +81,7 @@ _cairo_filler_add_spline (void *closure, XPointFixed *a, XPointFixed *b, XPointF
|
|||
{
|
||||
int i;
|
||||
cairo_status_t status = CAIRO_STATUS_SUCCESS;
|
||||
cairo_filler *filler = closure;
|
||||
cairo_filler_t *filler = closure;
|
||||
cairo_polygon_t *polygon = &filler->polygon;
|
||||
cairo_gstate_t *gstate = filler->gstate;
|
||||
cairo_spline_t spline;
|
||||
|
|
@ -107,10 +107,10 @@ _cairo_filler_add_spline (void *closure, XPointFixed *a, XPointFixed *b, XPointF
|
|||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_filler_done_sub_path (void *closure, cairo_sub_path_done done)
|
||||
_cairo_filler_done_sub_path (void *closure, cairo_sub_path_done_t done)
|
||||
{
|
||||
cairo_status_t status = CAIRO_STATUS_SUCCESS;
|
||||
cairo_filler *filler = closure;
|
||||
cairo_filler_t *filler = closure;
|
||||
cairo_polygon_t *polygon = &filler->polygon;
|
||||
|
||||
_cairo_polygon_close (polygon);
|
||||
|
|
@ -121,7 +121,7 @@ _cairo_filler_done_sub_path (void *closure, cairo_sub_path_done done)
|
|||
static cairo_status_t
|
||||
_cairo_filler_done_path (void *closure)
|
||||
{
|
||||
cairo_filler *filler = closure;
|
||||
cairo_filler_t *filler = closure;
|
||||
|
||||
return cairo_traps_tessellate_polygon (filler->traps,
|
||||
&filler->polygon,
|
||||
|
|
@ -139,7 +139,7 @@ _cairo_path_fill_to_traps (cairo_path_t *path, cairo_gstate_t *gstate, cairo_tra
|
|||
};
|
||||
|
||||
cairo_status_t status;
|
||||
cairo_filler filler;
|
||||
cairo_filler_t filler;
|
||||
|
||||
_cairo_filler_init (&filler, gstate, traps);
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "cairoint.h"
|
||||
|
||||
typedef struct _cairo_stroker {
|
||||
typedef struct cairo_stroker {
|
||||
cairo_gstate_t *gstate;
|
||||
cairo_traps_t *traps;
|
||||
|
||||
|
|
@ -39,14 +39,14 @@ typedef struct _cairo_stroker {
|
|||
int dash_index;
|
||||
int dash_on;
|
||||
double dash_remain;
|
||||
} cairo_stroker;
|
||||
} cairo_stroker_t;
|
||||
|
||||
/* private functions */
|
||||
static void
|
||||
_cairo_stroker_init (cairo_stroker *stroker, cairo_gstate_t *gstate, cairo_traps_t *traps);
|
||||
_cairo_stroker_init (cairo_stroker_t *stroker, cairo_gstate_t *gstate, cairo_traps_t *traps);
|
||||
|
||||
static void
|
||||
_cairo_stroker_fini (cairo_stroker *stroker);
|
||||
_cairo_stroker_fini (cairo_stroker_t *stroker);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_add_edge (void *closure, XPointFixed *p1, XPointFixed *p2);
|
||||
|
|
@ -58,7 +58,7 @@ static cairo_status_t
|
|||
_cairo_stroker_add_spline (void *closure, XPointFixed *a, XPointFixed *b, XPointFixed *c, XPointFixed *d);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_done_sub_path (void *closure, cairo_sub_path_done done);
|
||||
_cairo_stroker_done_sub_path (void *closure, cairo_sub_path_done_t done);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_done_path (void *closure);
|
||||
|
|
@ -70,10 +70,10 @@ static int
|
|||
_cairo_stroker_face_clockwise (cairo_stroke_face_t *in, cairo_stroke_face_t *out);
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_join (cairo_stroker *stroker, cairo_stroke_face_t *in, cairo_stroke_face_t *out);
|
||||
_cairo_stroker_join (cairo_stroker_t *stroker, cairo_stroke_face_t *in, cairo_stroke_face_t *out);
|
||||
|
||||
static void
|
||||
_cairo_stroker_start_dash (cairo_stroker *stroker)
|
||||
_cairo_stroker_start_dash (cairo_stroker_t *stroker)
|
||||
{
|
||||
cairo_gstate_t *gstate = stroker->gstate;
|
||||
double offset;
|
||||
|
|
@ -93,7 +93,7 @@ _cairo_stroker_start_dash (cairo_stroker *stroker)
|
|||
}
|
||||
|
||||
static void
|
||||
_cairo_stroker_step_dash (cairo_stroker *stroker, double step)
|
||||
_cairo_stroker_step_dash (cairo_stroker_t *stroker, double step)
|
||||
{
|
||||
cairo_gstate_t *gstate = stroker->gstate;
|
||||
stroker->dash_remain -= step;
|
||||
|
|
@ -107,7 +107,7 @@ _cairo_stroker_step_dash (cairo_stroker *stroker, double step)
|
|||
}
|
||||
|
||||
static void
|
||||
_cairo_stroker_init (cairo_stroker *stroker, cairo_gstate_t *gstate, cairo_traps_t *traps)
|
||||
_cairo_stroker_init (cairo_stroker_t *stroker, cairo_gstate_t *gstate, cairo_traps_t *traps)
|
||||
{
|
||||
stroker->gstate = gstate;
|
||||
stroker->traps = traps;
|
||||
|
|
@ -119,7 +119,7 @@ _cairo_stroker_init (cairo_stroker *stroker, cairo_gstate_t *gstate, cairo_traps
|
|||
}
|
||||
|
||||
static void
|
||||
_cairo_stroker_fini (cairo_stroker *stroker)
|
||||
_cairo_stroker_fini (cairo_stroker_t *stroker)
|
||||
{
|
||||
/* nothing to do here */
|
||||
}
|
||||
|
|
@ -145,7 +145,7 @@ _cairo_stroker_face_clockwise (cairo_stroke_face_t *in, cairo_stroke_face_t *out
|
|||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_join (cairo_stroker *stroker, cairo_stroke_face_t *in, cairo_stroke_face_t *out)
|
||||
_cairo_stroker_join (cairo_stroker_t *stroker, cairo_stroke_face_t *in, cairo_stroke_face_t *out)
|
||||
{
|
||||
cairo_status_t status;
|
||||
cairo_gstate_t *gstate = stroker->gstate;
|
||||
|
|
@ -267,7 +267,7 @@ _cairo_stroker_join (cairo_stroker *stroker, cairo_stroke_face_t *in, cairo_stro
|
|||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_cap (cairo_stroker *stroker, cairo_stroke_face_t *f)
|
||||
_cairo_stroker_cap (cairo_stroker_t *stroker, cairo_stroke_face_t *f)
|
||||
{
|
||||
cairo_status_t status;
|
||||
cairo_gstate_t *gstate = stroker->gstate;
|
||||
|
|
@ -388,7 +388,7 @@ _compute_face (XPointFixed *pt, cairo_slope_fixed_t *slope, cairo_gstate_t *gsta
|
|||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_add_sub_edge (cairo_stroker *stroker, XPointFixed *p1, XPointFixed *p2,
|
||||
_cairo_stroker_add_sub_edge (cairo_stroker_t *stroker, XPointFixed *p1, XPointFixed *p2,
|
||||
cairo_stroke_face_t *start, cairo_stroke_face_t *end)
|
||||
{
|
||||
cairo_gstate_t *gstate = stroker->gstate;
|
||||
|
|
@ -422,7 +422,7 @@ static cairo_status_t
|
|||
_cairo_stroker_add_edge (void *closure, XPointFixed *p1, XPointFixed *p2)
|
||||
{
|
||||
cairo_status_t status;
|
||||
cairo_stroker *stroker = closure;
|
||||
cairo_stroker_t *stroker = closure;
|
||||
cairo_stroke_face_t start, end;
|
||||
|
||||
if (p1->x == p2->x && p1->y == p2->y) {
|
||||
|
|
@ -461,7 +461,7 @@ static cairo_status_t
|
|||
_cairo_stroker_add_edge_dashed (void *closure, XPointFixed *p1, XPointFixed *p2)
|
||||
{
|
||||
cairo_status_t status = CAIRO_STATUS_SUCCESS;
|
||||
cairo_stroker *stroker = closure;
|
||||
cairo_stroker_t *stroker = closure;
|
||||
cairo_gstate_t *gstate = stroker->gstate;
|
||||
double mag, remain, tmp;
|
||||
double dx, dy;
|
||||
|
|
@ -567,7 +567,7 @@ static cairo_status_t
|
|||
_cairo_stroker_add_spline (void *closure, XPointFixed *a, XPointFixed *b, XPointFixed *c, XPointFixed *d)
|
||||
{
|
||||
cairo_status_t status = CAIRO_STATUS_SUCCESS;
|
||||
cairo_stroker *stroker = closure;
|
||||
cairo_stroker_t *stroker = closure;
|
||||
cairo_gstate_t *gstate = stroker->gstate;
|
||||
cairo_spline_t spline;
|
||||
cairo_pen_t pen;
|
||||
|
|
@ -629,10 +629,10 @@ _cairo_stroker_add_spline (void *closure, XPointFixed *a, XPointFixed *b, XPoint
|
|||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_done_sub_path (void *closure, cairo_sub_path_done done)
|
||||
_cairo_stroker_done_sub_path (void *closure, cairo_sub_path_done_t done)
|
||||
{
|
||||
cairo_status_t status;
|
||||
cairo_stroker *stroker = closure;
|
||||
cairo_stroker_t *stroker = closure;
|
||||
|
||||
switch (done) {
|
||||
case cairo_sub_path_done_join:
|
||||
|
|
@ -697,7 +697,7 @@ _cairo_path_stroke_to_traps (cairo_path_t *path, cairo_gstate_t *gstate, cairo_t
|
|||
const cairo_path_callbacks_t *callbacks = gstate->dash ? &stroker_dashed_cb : &stroker_solid_cb;
|
||||
|
||||
cairo_status_t status;
|
||||
cairo_stroker stroker;
|
||||
cairo_stroker_t stroker;
|
||||
|
||||
_cairo_stroker_init (&stroker, gstate, traps);
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ cairo_status_t
|
|||
_cairo_pen_init (cairo_pen_t *pen, double radius, cairo_gstate_t *gstate)
|
||||
{
|
||||
int i;
|
||||
cairo_pen_vertex *v;
|
||||
cairo_pen_vertex_t *v;
|
||||
double dx, dy;
|
||||
|
||||
if (pen->num_vertices) {
|
||||
|
|
@ -81,7 +81,7 @@ _cairo_pen_init (cairo_pen_t *pen, double radius, cairo_gstate_t *gstate)
|
|||
if (pen->num_vertices % 2)
|
||||
pen->num_vertices++;
|
||||
|
||||
pen->vertex = malloc (pen->num_vertices * sizeof (cairo_pen_vertex));
|
||||
pen->vertex = malloc (pen->num_vertices * sizeof (cairo_pen_vertex_t));
|
||||
if (pen->vertex == NULL) {
|
||||
return CAIRO_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
|
@ -118,11 +118,11 @@ _cairo_pen_init_copy (cairo_pen_t *pen, cairo_pen_t *other)
|
|||
*pen = *other;
|
||||
|
||||
if (pen->num_vertices) {
|
||||
pen->vertex = malloc (pen->num_vertices * sizeof (cairo_pen_vertex));
|
||||
pen->vertex = malloc (pen->num_vertices * sizeof (cairo_pen_vertex_t));
|
||||
if (pen->vertex == NULL) {
|
||||
return CAIRO_STATUS_NO_MEMORY;
|
||||
}
|
||||
memcpy (pen->vertex, other->vertex, pen->num_vertices * sizeof (cairo_pen_vertex));
|
||||
memcpy (pen->vertex, other->vertex, pen->num_vertices * sizeof (cairo_pen_vertex_t));
|
||||
}
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
|
@ -132,8 +132,8 @@ static int
|
|||
_cairo_pen_vertex_compare_by_theta (const void *a, const void *b)
|
||||
{
|
||||
double diff;
|
||||
const cairo_pen_vertex *va = a;
|
||||
const cairo_pen_vertex *vb = b;
|
||||
const cairo_pen_vertex_t *va = a;
|
||||
const cairo_pen_vertex_t *vb = b;
|
||||
|
||||
diff = va->theta - vb->theta;
|
||||
if (diff < 0)
|
||||
|
|
@ -148,10 +148,10 @@ cairo_status_t
|
|||
_cairo_pen_add_points (cairo_pen_t *pen, XPointFixed *pt, int num_pts)
|
||||
{
|
||||
int i, j;
|
||||
cairo_pen_vertex *v, *v_next, *new_vertex;
|
||||
cairo_pen_vertex_t *v, *v_next, *new_vertex;
|
||||
|
||||
pen->num_vertices += num_pts;
|
||||
new_vertex = realloc (pen->vertex, pen->num_vertices * sizeof (cairo_pen_vertex));
|
||||
new_vertex = realloc (pen->vertex, pen->num_vertices * sizeof (cairo_pen_vertex_t));
|
||||
if (new_vertex == NULL) {
|
||||
pen->num_vertices -= num_pts;
|
||||
return CAIRO_STATUS_NO_MEMORY;
|
||||
|
|
@ -167,7 +167,7 @@ _cairo_pen_add_points (cairo_pen_t *pen, XPointFixed *pt, int num_pts)
|
|||
v->theta += 2 * M_PI;
|
||||
}
|
||||
|
||||
qsort (pen->vertex, pen->num_vertices, sizeof (cairo_pen_vertex), _cairo_pen_vertex_compare_by_theta);
|
||||
qsort (pen->vertex, pen->num_vertices, sizeof (cairo_pen_vertex_t), _cairo_pen_vertex_compare_by_theta);
|
||||
|
||||
/* eliminate any duplicate vertices */
|
||||
for (i=0; i < pen->num_vertices - 1; i++ ) {
|
||||
|
|
@ -210,7 +210,7 @@ static void
|
|||
_cairo_pen_compute_slopes (cairo_pen_t *pen)
|
||||
{
|
||||
int i, i_prev;
|
||||
cairo_pen_vertex *prev, *v, *next;
|
||||
cairo_pen_vertex_t *prev, *v, *next;
|
||||
|
||||
for (i=0, i_prev = pen->num_vertices - 1;
|
||||
i < pen->num_vertices;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ _cairo_spline_decompose_into (cairo_spline_t *spline, double tolerance_squared,
|
|||
|
||||
#define CAIRO_SPLINE_GROWTH_INC 100
|
||||
|
||||
cairo_int_status
|
||||
cairo_int_status_t
|
||||
_cairo_spline_init (cairo_spline_t *spline, XPointFixed *a, XPointFixed *b, XPointFixed *c, XPointFixed *d)
|
||||
{
|
||||
spline->a = *a;
|
||||
|
|
|
|||
|
|
@ -49,31 +49,31 @@
|
|||
/* Sure wish C had a real enum type so that this would be distinct
|
||||
from cairo_status_t. Oh well, without that, I'll use this bogus 1000
|
||||
offset */
|
||||
typedef enum _cairo_int_status {
|
||||
typedef enum cairo_int_status {
|
||||
cairo_int_status_degenerate = 1000
|
||||
} cairo_int_status;
|
||||
} cairo_int_status_t;
|
||||
|
||||
typedef enum _cairo_path_op {
|
||||
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
|
||||
} __attribute__ ((packed)) cairo_path_op; /* Don't want 32 bits if we can avoid it. */
|
||||
} __attribute__ ((packed)) cairo_path_op_t; /* Don't want 32 bits if we can avoid it. */
|
||||
|
||||
typedef enum _cairo_path_direction {
|
||||
typedef enum cairo_path_direction {
|
||||
cairo_path_direction_forward,
|
||||
cairo_path_direction_reverse
|
||||
} cairo_path_direction;
|
||||
} cairo_path_direction_t;
|
||||
|
||||
typedef enum _cairo_sub_path_done {
|
||||
typedef enum cairo_sub_path_done {
|
||||
cairo_sub_path_done_cap,
|
||||
cairo_sub_path_done_join
|
||||
} cairo_sub_path_done;
|
||||
} cairo_sub_path_done_t;
|
||||
|
||||
typedef struct cairo_path_callbacks {
|
||||
cairo_status_t (*AddEdge) (void *closure, XPointFixed *p1, XPointFixed *p2);
|
||||
cairo_status_t (*AddSpline) (void *closure, XPointFixed *a, XPointFixed *b, XPointFixed *c, XPointFixed *d);
|
||||
cairo_status_t (*DoneSubPath) (void *closure, cairo_sub_path_done done);
|
||||
cairo_status_t (*DoneSubPath) (void *closure, cairo_sub_path_done_t done);
|
||||
cairo_status_t (*DonePath) (void *closure);
|
||||
} cairo_path_callbacks_t;
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ typedef struct cairo_path_callbacks {
|
|||
|
||||
typedef struct cairo_path_op_buf {
|
||||
int num_ops;
|
||||
cairo_path_op op[CAIRO_PATH_BUF_SZ];
|
||||
cairo_path_op_t op[CAIRO_PATH_BUF_SZ];
|
||||
|
||||
struct cairo_path_op_buf *next, *prev;
|
||||
} cairo_path_op_buf_t;
|
||||
|
|
@ -151,17 +151,17 @@ typedef struct _cairo_pen_vertex {
|
|||
double theta;
|
||||
cairo_slope_fixed_t slope_ccw;
|
||||
cairo_slope_fixed_t slope_cw;
|
||||
} cairo_pen_vertex;
|
||||
} cairo_pen_vertex_t;
|
||||
|
||||
typedef struct cairo_pen {
|
||||
double radius;
|
||||
double tolerance;
|
||||
|
||||
int num_vertices;
|
||||
cairo_pen_vertex *vertex;
|
||||
cairo_pen_vertex_t *vertex;
|
||||
} cairo_pen_t;
|
||||
|
||||
struct cairo_surface_t {
|
||||
struct cairo_surface {
|
||||
Display *dpy;
|
||||
char *image_data;
|
||||
|
||||
|
|
@ -181,7 +181,7 @@ typedef struct cairo_color {
|
|||
XcColor xc_color;
|
||||
} cairo_color_t;
|
||||
|
||||
struct cairo_matrix_t {
|
||||
struct cairo_matrix {
|
||||
double m[3][2];
|
||||
};
|
||||
|
||||
|
|
@ -547,7 +547,7 @@ _cairo_path_close_path (cairo_path_t *path);
|
|||
|
||||
cairo_status_t
|
||||
_cairo_path_interpret (cairo_path_t *path,
|
||||
cairo_path_direction dir,
|
||||
cairo_path_direction_t dir,
|
||||
const cairo_path_callbacks_t *cb,
|
||||
void *closure);
|
||||
|
||||
|
|
@ -641,7 +641,7 @@ cairo_status_t
|
|||
_cairo_polygon_close (cairo_polygon_t *polygon);
|
||||
|
||||
/* cairo_spline_t.c */
|
||||
cairo_int_status
|
||||
cairo_int_status_t
|
||||
_cairo_spline_init (cairo_spline_t *spline,
|
||||
XPointFixed *a,
|
||||
XPointFixed *b,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue