mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-15 17:18:05 +02:00
Merge branch 'function-signature-mismatch-fix' into 'master'
Function signature varies cause some API break in WebAssembly build See merge request cairo/cairo!255
This commit is contained in:
commit
995e7c8156
17 changed files with 66 additions and 45 deletions
|
|
@ -472,7 +472,8 @@ _add_edge (struct reduce *r,
|
|||
|
||||
static cairo_status_t
|
||||
_reduce_line_to (void *closure,
|
||||
const cairo_point_t *point)
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
struct reduce *r = closure;
|
||||
|
||||
|
|
@ -487,7 +488,7 @@ _reduce_close (void *closure)
|
|||
{
|
||||
struct reduce *r = closure;
|
||||
|
||||
return _reduce_line_to (r, &r->last_move_to);
|
||||
return _reduce_line_to (r, &r->last_move_to, NULL);
|
||||
}
|
||||
|
||||
static cairo_status_t
|
||||
|
|
|
|||
|
|
@ -200,7 +200,8 @@ _print_move_to (void *closure,
|
|||
|
||||
static cairo_status_t
|
||||
_print_line_to (void *closure,
|
||||
const cairo_point_t *point)
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
fprintf (closure,
|
||||
" %f %f l",
|
||||
|
|
|
|||
|
|
@ -66,7 +66,8 @@ _cairo_path_bounder_move_to (void *closure,
|
|||
|
||||
static cairo_status_t
|
||||
_cairo_path_bounder_line_to (void *closure,
|
||||
const cairo_point_t *point)
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
cairo_path_bounder_t *bounder = closure;
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,8 @@ typedef struct cairo_filler {
|
|||
|
||||
static cairo_status_t
|
||||
_cairo_filler_line_to (void *closure,
|
||||
const cairo_point_t *point)
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
cairo_filler_t *filler = closure;
|
||||
cairo_status_t status;
|
||||
|
|
@ -83,7 +84,7 @@ _cairo_filler_close (void *closure)
|
|||
cairo_filler_t *filler = closure;
|
||||
|
||||
/* close the subpath */
|
||||
return _cairo_filler_line_to (closure, &filler->last_move_to);
|
||||
return _cairo_filler_line_to (closure, &filler->last_move_to, NULL);
|
||||
}
|
||||
|
||||
static cairo_status_t
|
||||
|
|
@ -117,14 +118,14 @@ _cairo_filler_curve_to (void *closure,
|
|||
if (filler->has_limits) {
|
||||
if (! _cairo_spline_intersects (&filler->current_point, p1, p2, p3,
|
||||
&filler->limit))
|
||||
return _cairo_filler_line_to (filler, p3);
|
||||
return _cairo_filler_line_to (filler, p3, NULL);
|
||||
}
|
||||
|
||||
if (! _cairo_spline_init (&spline,
|
||||
_cairo_filler_add_point, filler,
|
||||
&filler->current_point, p1, p2, p3))
|
||||
{
|
||||
return _cairo_filler_line_to (closure, p3);
|
||||
return _cairo_filler_line_to (closure, p3, NULL);
|
||||
}
|
||||
|
||||
return _cairo_spline_decompose (&spline, filler->tolerance);
|
||||
|
|
@ -173,7 +174,8 @@ typedef struct cairo_filler_rectilinear_aligned {
|
|||
|
||||
static cairo_status_t
|
||||
_cairo_filler_ra_line_to (void *closure,
|
||||
const cairo_point_t *point)
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
cairo_filler_ra_t *filler = closure;
|
||||
cairo_status_t status;
|
||||
|
|
@ -195,7 +197,7 @@ static cairo_status_t
|
|||
_cairo_filler_ra_close (void *closure)
|
||||
{
|
||||
cairo_filler_ra_t *filler = closure;
|
||||
return _cairo_filler_ra_line_to (closure, &filler->last_move_to);
|
||||
return _cairo_filler_ra_line_to (closure, &filler->last_move_to, NULL);
|
||||
}
|
||||
|
||||
static cairo_status_t
|
||||
|
|
|
|||
|
|
@ -828,7 +828,7 @@ _cairo_path_fixed_interpret (const cairo_path_fixed_t *path,
|
|||
points += 1;
|
||||
break;
|
||||
case CAIRO_PATH_OP_LINE_TO:
|
||||
status = (*line_to) (closure, &points[0]);
|
||||
status = (*line_to) (closure, &points[0], NULL);
|
||||
points += 1;
|
||||
break;
|
||||
case CAIRO_PATH_OP_CURVE_TO:
|
||||
|
|
@ -871,7 +871,8 @@ _append_move_to (void *abstract_closure,
|
|||
|
||||
static cairo_status_t
|
||||
_append_line_to (void *abstract_closure,
|
||||
const cairo_point_t *point)
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
cairo_path_fixed_append_closure_t *closure = abstract_closure;
|
||||
|
||||
|
|
@ -1125,13 +1126,14 @@ _cpf_move_to (void *closure,
|
|||
|
||||
static cairo_status_t
|
||||
_cpf_line_to (void *closure,
|
||||
const cairo_point_t *point)
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
cpf_t *cpf = closure;
|
||||
|
||||
cpf->current_point = *point;
|
||||
|
||||
return cpf->line_to (cpf->closure, point);
|
||||
return cpf->line_to (cpf->closure, point, NULL);
|
||||
}
|
||||
|
||||
static cairo_status_t
|
||||
|
|
@ -1158,7 +1160,7 @@ _cpf_curve_to (void *closure,
|
|||
cpf,
|
||||
p0, p1, p2, p3))
|
||||
{
|
||||
return _cpf_line_to (closure, p3);
|
||||
return _cpf_line_to (closure, p3, NULL);
|
||||
}
|
||||
|
||||
cpf->current_point = *p3;
|
||||
|
|
|
|||
|
|
@ -170,7 +170,8 @@ _cairo_in_fill_move_to (void *closure,
|
|||
|
||||
static cairo_status_t
|
||||
_cairo_in_fill_line_to (void *closure,
|
||||
const cairo_point_t *point)
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
cairo_in_fill_t *in_fill = closure;
|
||||
|
||||
|
|
|
|||
|
|
@ -447,7 +447,8 @@ _cairo_rectilinear_stroker_move_to (void *closure,
|
|||
|
||||
static cairo_status_t
|
||||
_cairo_rectilinear_stroker_line_to (void *closure,
|
||||
const cairo_point_t *b)
|
||||
const cairo_point_t *b,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
cairo_rectilinear_stroker_t *stroker = closure;
|
||||
cairo_point_t *a = &stroker->current_point;
|
||||
|
|
@ -471,7 +472,8 @@ _cairo_rectilinear_stroker_line_to (void *closure,
|
|||
|
||||
static cairo_status_t
|
||||
_cairo_rectilinear_stroker_line_to_dashed (void *closure,
|
||||
const cairo_point_t *point)
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
cairo_rectilinear_stroker_t *stroker = closure;
|
||||
const cairo_point_t *a = &stroker->current_point;
|
||||
|
|
@ -586,10 +588,10 @@ _cairo_rectilinear_stroker_close_path (void *closure)
|
|||
|
||||
if (stroker->dash.dashed) {
|
||||
status = _cairo_rectilinear_stroker_line_to_dashed (stroker,
|
||||
&stroker->first_point);
|
||||
&stroker->first_point, NULL);
|
||||
} else {
|
||||
status = _cairo_rectilinear_stroker_line_to (stroker,
|
||||
&stroker->first_point);
|
||||
&stroker->first_point, NULL);
|
||||
}
|
||||
if (unlikely (status))
|
||||
return status;
|
||||
|
|
|
|||
|
|
@ -1005,7 +1005,8 @@ move_to (void *closure,
|
|||
|
||||
static cairo_status_t
|
||||
line_to (void *closure,
|
||||
const cairo_point_t *point)
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
struct stroker *stroker = closure;
|
||||
cairo_stroke_face_t start;
|
||||
|
|
@ -1154,11 +1155,11 @@ curve_to (void *closure,
|
|||
if (stroker->has_bounds &&
|
||||
! _cairo_spline_intersects (&stroker->current_face.point, b, c, d,
|
||||
&stroker->bounds))
|
||||
return line_to (closure, d);
|
||||
return line_to (closure, d, NULL);
|
||||
|
||||
if (! _cairo_spline_init (&spline, spline_to, stroker,
|
||||
&stroker->current_face.point, b, c, d))
|
||||
return line_to (closure, d);
|
||||
return line_to (closure, d, NULL);
|
||||
|
||||
compute_face (&stroker->current_face.point, &spline.initial_slope,
|
||||
stroker, &face);
|
||||
|
|
@ -1190,7 +1191,7 @@ close_path (void *closure)
|
|||
struct stroker *stroker = closure;
|
||||
cairo_status_t status;
|
||||
|
||||
status = line_to (stroker, &stroker->first_point);
|
||||
status = line_to (stroker, &stroker->first_point, NULL);
|
||||
if (unlikely (status))
|
||||
return status;
|
||||
|
||||
|
|
|
|||
|
|
@ -795,7 +795,7 @@ move_to_dashed (void *closure, const cairo_point_t *point)
|
|||
}
|
||||
|
||||
static cairo_status_t
|
||||
line_to (void *closure, const cairo_point_t *point)
|
||||
line_to (void *closure, const cairo_point_t *point, const cairo_slope_t *tangent)
|
||||
{
|
||||
struct stroker *stroker = closure;
|
||||
cairo_stroke_face_t start, end;
|
||||
|
|
@ -829,7 +829,7 @@ line_to (void *closure, const cairo_point_t *point)
|
|||
* Dashed lines. Cap each dash end, join around turns when on
|
||||
*/
|
||||
static cairo_status_t
|
||||
line_to_dashed (void *closure, const cairo_point_t *point)
|
||||
line_to_dashed (void *closure, const cairo_point_t *point, const cairo_slope_t *tangent)
|
||||
{
|
||||
struct stroker *stroker = closure;
|
||||
double mag, remain, step_length = 0;
|
||||
|
|
@ -1016,11 +1016,11 @@ curve_to (void *closure,
|
|||
if (stroker->has_bounds &&
|
||||
! _cairo_spline_intersects (&stroker->current_face.point, b, c, d,
|
||||
&stroker->line_bounds))
|
||||
return line_to (closure, d);
|
||||
return line_to (closure, d, NULL);
|
||||
|
||||
if (! _cairo_spline_init (&spline, spline_to, stroker,
|
||||
&stroker->current_face.point, b, c, d))
|
||||
return line_to (closure, d);
|
||||
return line_to (closure, d, NULL);
|
||||
|
||||
compute_face (&stroker->current_face.point, &spline.initial_slope,
|
||||
stroker, &face);
|
||||
|
|
@ -1108,7 +1108,7 @@ close_path (void *closure)
|
|||
struct stroker *stroker = closure;
|
||||
cairo_status_t status;
|
||||
|
||||
status = line_to (stroker, &stroker->first_point);
|
||||
status = line_to (stroker, &stroker->first_point, NULL);
|
||||
if (unlikely (status))
|
||||
return status;
|
||||
|
||||
|
|
@ -1121,7 +1121,7 @@ close_path_dashed (void *closure)
|
|||
struct stroker *stroker = closure;
|
||||
cairo_status_t status;
|
||||
|
||||
status = line_to_dashed (stroker, &stroker->first_point);
|
||||
status = line_to_dashed (stroker, &stroker->first_point, NULL);
|
||||
if (unlikely (status))
|
||||
return status;
|
||||
|
||||
|
|
|
|||
|
|
@ -834,7 +834,8 @@ move_to (void *closure,
|
|||
|
||||
static cairo_status_t
|
||||
line_to (void *closure,
|
||||
const cairo_point_t *point)
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
struct stroker *stroker = closure;
|
||||
cairo_stroke_face_t start;
|
||||
|
|
@ -971,12 +972,12 @@ curve_to (void *closure,
|
|||
if (stroker->has_limits) {
|
||||
if (! _cairo_spline_intersects (&stroker->current_face.point, b, c, d,
|
||||
&stroker->limit))
|
||||
return line_to (closure, d);
|
||||
return line_to (closure, d, NULL);
|
||||
}
|
||||
|
||||
if (! _cairo_spline_init (&spline, spline_to, stroker,
|
||||
&stroker->current_face.point, b, c, d))
|
||||
return line_to (closure, d);
|
||||
return line_to (closure, d, NULL);
|
||||
|
||||
compute_face (&stroker->current_face.point, &spline.initial_slope,
|
||||
stroker, &face);
|
||||
|
|
@ -1009,7 +1010,7 @@ close_path (void *closure)
|
|||
struct stroker *stroker = closure;
|
||||
cairo_status_t status;
|
||||
|
||||
status = line_to (stroker, &stroker->first_point);
|
||||
status = line_to (stroker, &stroker->first_point, NULL);
|
||||
if (unlikely (status))
|
||||
return status;
|
||||
|
||||
|
|
|
|||
|
|
@ -940,7 +940,8 @@ _cairo_stroker_move_to (void *closure,
|
|||
|
||||
static cairo_status_t
|
||||
_cairo_stroker_line_to (void *closure,
|
||||
const cairo_point_t *point)
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
cairo_stroker_t *stroker = closure;
|
||||
cairo_stroke_face_t start, end;
|
||||
|
|
@ -1086,7 +1087,8 @@ _cairo_stroker_spline_to (void *closure,
|
|||
*/
|
||||
static cairo_status_t
|
||||
_cairo_stroker_line_to_dashed (void *closure,
|
||||
const cairo_point_t *p2)
|
||||
const cairo_point_t *p2,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
cairo_stroker_t *stroker = closure;
|
||||
double mag, remain, step_length = 0;
|
||||
|
|
@ -1340,9 +1342,9 @@ _cairo_stroker_close_path (void *closure)
|
|||
cairo_status_t status;
|
||||
|
||||
if (stroker->dash.dashed)
|
||||
status = _cairo_stroker_line_to_dashed (stroker, &stroker->first_point);
|
||||
status = _cairo_stroker_line_to_dashed (stroker, &stroker->first_point, NULL);
|
||||
else
|
||||
status = _cairo_stroker_line_to (stroker, &stroker->first_point);
|
||||
status = _cairo_stroker_line_to (stroker, &stroker->first_point, NULL);
|
||||
if (unlikely (status))
|
||||
return status;
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,8 @@ _cpc_move_to (void *closure,
|
|||
|
||||
static cairo_status_t
|
||||
_cpc_line_to (void *closure,
|
||||
const cairo_point_t *point)
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
cpc_t *cpc = closure;
|
||||
|
||||
|
|
@ -169,7 +170,8 @@ _cpp_move_to (void *closure,
|
|||
|
||||
static cairo_status_t
|
||||
_cpp_line_to (void *closure,
|
||||
const cairo_point_t *point)
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
cpp_t *cpp = closure;
|
||||
cairo_path_data_t *data = cpp->data;
|
||||
|
|
|
|||
|
|
@ -407,7 +407,8 @@ _cairo_pdf_path_move_to (void *closure,
|
|||
|
||||
static cairo_status_t
|
||||
_cairo_pdf_path_line_to (void *closure,
|
||||
const cairo_point_t *point)
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
pdf_path_info_t *info = closure;
|
||||
double x = _cairo_fixed_to_double (point->x);
|
||||
|
|
|
|||
|
|
@ -1844,7 +1844,8 @@ _path_move_to (void *closure,
|
|||
|
||||
static cairo_status_t
|
||||
_path_line_to (void *closure,
|
||||
const cairo_point_t *point)
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
_cairo_output_stream_printf (closure,
|
||||
" %f %f l",
|
||||
|
|
|
|||
|
|
@ -1240,7 +1240,8 @@ _cairo_svg_path_move_to (void *closure,
|
|||
|
||||
static cairo_status_t
|
||||
_cairo_svg_path_line_to (void *closure,
|
||||
const cairo_point_t *point)
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
svg_path_info_t *info = closure;
|
||||
double x = _cairo_fixed_to_double (point->x);
|
||||
|
|
|
|||
|
|
@ -248,7 +248,8 @@ _charstring_move_to (void *closure,
|
|||
|
||||
static cairo_status_t
|
||||
_charstring_line_to (void *closure,
|
||||
const cairo_point_t *point)
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent)
|
||||
{
|
||||
t1_path_info_t *path_info = (t1_path_info_t *) closure;
|
||||
int dx, dy;
|
||||
|
|
|
|||
|
|
@ -1014,7 +1014,8 @@ typedef cairo_status_t
|
|||
|
||||
typedef cairo_status_t
|
||||
(cairo_path_fixed_line_to_func_t) (void *closure,
|
||||
const cairo_point_t *point);
|
||||
const cairo_point_t *point,
|
||||
const cairo_slope_t *tangent);
|
||||
|
||||
typedef cairo_status_t
|
||||
(cairo_path_fixed_curve_to_func_t) (void *closure,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue