diff options
author | Andrea Canciani <ranma42@gmail.com> | 2010-12-09 22:00:01 +0100 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2010-12-10 10:58:51 +0100 |
commit | a8ae8759f51a283fc1d65b055eda8e401d9ccf2e (patch) | |
tree | 82bb931095c8aee91694ffb06105dcdae95f7f76 | |
parent | 83605de9958696d47b15baa2c95731bc076ff368 (diff) |
path: Always interpret in forward direction
Path are always interpreted in forward direction, so the ability of
interpreting in the opposite direction (which is very unlikely to be
useful at all) can be removed.
-rw-r--r-- | src/cairo-debug.c | 1 | ||||
-rw-r--r-- | src/cairo-path-bounds.c | 2 | ||||
-rw-r--r-- | src/cairo-path-fill.c | 1 | ||||
-rw-r--r-- | src/cairo-path-fixed-private.h | 1 | ||||
-rw-r--r-- | src/cairo-path-fixed.c | 11 | ||||
-rw-r--r-- | src/cairo-path-in-fill.c | 1 | ||||
-rw-r--r-- | src/cairo-path-stroke.c | 4 | ||||
-rw-r--r-- | src/cairo-path.c | 4 | ||||
-rw-r--r-- | src/cairo-pdf-operators.c | 1 | ||||
-rw-r--r-- | src/cairo-qt-surface.cpp | 1 | ||||
-rw-r--r-- | src/cairo-quartz-surface.c | 1 | ||||
-rw-r--r-- | src/cairo-recording-surface.c | 2 | ||||
-rw-r--r-- | src/cairo-scaled-font.c | 2 | ||||
-rw-r--r-- | src/cairo-script-surface.c | 1 | ||||
-rw-r--r-- | src/cairo-skia-surface.cpp | 1 | ||||
-rw-r--r-- | src/cairo-svg-surface.c | 1 | ||||
-rw-r--r-- | src/cairo-type1-fallback.c | 1 | ||||
-rw-r--r-- | src/cairo-vg-surface.c | 1 | ||||
-rw-r--r-- | src/cairo-win32-printing-surface.c | 1 | ||||
-rw-r--r-- | src/cairo-xml-surface.c | 1 | ||||
-rw-r--r-- | src/cairoint.h | 2 |
21 files changed, 7 insertions, 34 deletions
diff --git a/src/cairo-debug.c b/src/cairo-debug.c index e9e72b6a..b8bdfd1f 100644 --- a/src/cairo-debug.c +++ b/src/cairo-debug.c @@ -240,7 +240,6 @@ _cairo_debug_print_path (FILE *stream, cairo_path_fixed_t *path) _cairo_fixed_to_double (path->extents.p2.y)); status = _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, _print_move_to, _print_line_to, _print_curve_to, diff --git a/src/cairo-path-bounds.c b/src/cairo-path-bounds.c index d17d9a20..204b9828 100644 --- a/src/cairo-path-bounds.c +++ b/src/cairo-path-bounds.c @@ -106,7 +106,7 @@ _cairo_path_bounder_extents (const cairo_path_fixed_t *path, cairo_status_t status; bounder.has_extents = FALSE; - status = _cairo_path_fixed_interpret (path, CAIRO_DIRECTION_FORWARD, + status = _cairo_path_fixed_interpret (path, _cairo_path_bounder_move_to, _cairo_path_bounder_line_to, _cairo_path_bounder_curve_to, diff --git a/src/cairo-path-fill.c b/src/cairo-path-fill.c index 358c8b9e..845cdfcf 100644 --- a/src/cairo-path-fill.c +++ b/src/cairo-path-fill.c @@ -115,7 +115,6 @@ _cairo_path_fixed_fill_to_polygon (const cairo_path_fixed_t *path, _cairo_filler_init (&filler, tolerance, polygon); status = _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, _cairo_filler_move_to, _cairo_filler_line_to, _cairo_filler_curve_to, diff --git a/src/cairo-path-fixed-private.h b/src/cairo-path-fixed-private.h index 9fcd5020..e24b1c79 100644 --- a/src/cairo-path-fixed-private.h +++ b/src/cairo-path-fixed-private.h @@ -109,7 +109,6 @@ _cairo_path_fixed_translate (cairo_path_fixed_t *path, cairo_private cairo_status_t _cairo_path_fixed_append (cairo_path_fixed_t *path, const cairo_path_fixed_t *other, - cairo_direction_t dir, cairo_fixed_t tx, cairo_fixed_t ty); diff --git a/src/cairo-path-fixed.c b/src/cairo-path-fixed.c index 3093f260..2f2d901f 100644 --- a/src/cairo-path-fixed.c +++ b/src/cairo-path-fixed.c @@ -804,7 +804,6 @@ _cairo_path_buf_add_points (cairo_path_buf_t *buf, cairo_status_t _cairo_path_fixed_interpret (const 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, @@ -819,7 +818,7 @@ _cairo_path_fixed_interpret (const cairo_path_fixed_t *path, }; cairo_status_t status; const cairo_path_buf_t *buf, *first; - cairo_bool_t forward = (dir == CAIRO_DIRECTION_FORWARD); + cairo_bool_t forward = TRUE; int step = forward ? 1 : -1; buf = first = forward ? cairo_path_head (path) : cairo_path_tail (path); @@ -925,7 +924,6 @@ _append_close_path (void *abstract_closure) cairo_status_t _cairo_path_fixed_append (cairo_path_fixed_t *path, const cairo_path_fixed_t *other, - cairo_direction_t dir, cairo_fixed_t tx, cairo_fixed_t ty) { @@ -935,7 +933,7 @@ _cairo_path_fixed_append (cairo_path_fixed_t *path, closure.offset.x = tx; closure.offset.y = ty; - return _cairo_path_fixed_interpret (other, dir, + return _cairo_path_fixed_interpret (other, _append_move_to, _append_line_to, _append_curve_to, @@ -1175,7 +1173,6 @@ _cpf_close_path (void *closure) cairo_status_t _cairo_path_fixed_interpret_flat (const 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_close_path_func_t *close_path, @@ -1185,7 +1182,7 @@ _cairo_path_fixed_interpret_flat (const cairo_path_fixed_t *path, cpf_t flattener; if (! path->has_curve_to) { - return _cairo_path_fixed_interpret (path, dir, + return _cairo_path_fixed_interpret (path, move_to, line_to, NULL, @@ -1198,7 +1195,7 @@ _cairo_path_fixed_interpret_flat (const cairo_path_fixed_t *path, flattener.line_to = line_to; flattener.close_path = close_path; flattener.closure = closure; - return _cairo_path_fixed_interpret (path, dir, + return _cairo_path_fixed_interpret (path, _cpf_move_to, _cpf_line_to, _cpf_curve_to, diff --git a/src/cairo-path-in-fill.c b/src/cairo-path-in-fill.c index a19784c9..37388744 100644 --- a/src/cairo-path-in-fill.c +++ b/src/cairo-path-in-fill.c @@ -260,7 +260,6 @@ _cairo_path_fixed_in_fill (const cairo_path_fixed_t *path, _cairo_in_fill_init (&in_fill, tolerance, x, y); status = _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, _cairo_in_fill_move_to, _cairo_in_fill_line_to, _cairo_in_fill_curve_to, diff --git a/src/cairo-path-stroke.c b/src/cairo-path-stroke.c index cdf22ce7..2b5e23ab 100644 --- a/src/cairo-path-stroke.c +++ b/src/cairo-path-stroke.c @@ -1319,7 +1319,6 @@ _cairo_path_fixed_stroke_to_shaper (cairo_path_fixed_t *path, stroker.closure = closure; status = _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, _cairo_stroker_move_to, stroker.dash.dashed ? _cairo_stroker_line_to_dashed : @@ -1363,7 +1362,6 @@ _cairo_path_fixed_stroke_to_polygon (const cairo_path_fixed_t *path, _cairo_stroker_limit (&stroker, polygon->limits, polygon->num_limits); status = _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, _cairo_stroker_move_to, stroker.dash.dashed ? _cairo_stroker_line_to_dashed : @@ -2054,7 +2052,6 @@ _cairo_path_fixed_stroke_rectilinear_to_traps (const cairo_path_fixed_t *path, } status = _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, _cairo_rectilinear_stroker_move_to, rectilinear_stroker.dash.dashed ? _cairo_rectilinear_stroker_line_to_dashed : @@ -2108,7 +2105,6 @@ _cairo_path_fixed_stroke_rectilinear_to_boxes (const cairo_path_fixed_t *path, } status = _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, _cairo_rectilinear_stroker_move_to, rectilinear_stroker.dash.dashed ? _cairo_rectilinear_stroker_line_to_dashed : diff --git a/src/cairo-path.c b/src/cairo-path.c index 88a730b3..d9f08acc 100644 --- a/src/cairo-path.c +++ b/src/cairo-path.c @@ -115,7 +115,6 @@ _cairo_path_count (cairo_path_t *path, if (flatten) { status = _cairo_path_fixed_interpret_flat (path_fixed, - CAIRO_DIRECTION_FORWARD, _cpc_move_to, _cpc_line_to, _cpc_close_path, @@ -123,7 +122,6 @@ _cairo_path_count (cairo_path_t *path, tolerance); } else { status = _cairo_path_fixed_interpret (path_fixed, - CAIRO_DIRECTION_FORWARD, _cpc_move_to, _cpc_line_to, _cpc_curve_to, @@ -264,7 +262,6 @@ _cairo_path_populate (cairo_path_t *path, if (flatten) { double tolerance = _cairo_gstate_get_tolerance (gstate); status = _cairo_path_fixed_interpret_flat (path_fixed, - CAIRO_DIRECTION_FORWARD, _cpp_move_to, _cpp_line_to, _cpp_close_path, @@ -272,7 +269,6 @@ _cairo_path_populate (cairo_path_t *path, tolerance); } else { status = _cairo_path_fixed_interpret (path_fixed, - CAIRO_DIRECTION_FORWARD, _cpp_move_to, _cpp_line_to, _cpp_curve_to, diff --git a/src/cairo-pdf-operators.c b/src/cairo-pdf-operators.c index 54a30b29..0f2500e4 100644 --- a/src/cairo-pdf-operators.c +++ b/src/cairo-pdf-operators.c @@ -514,7 +514,6 @@ _cairo_pdf_operators_emit_path (cairo_pdf_operators_t *pdf_operators, status = _cairo_pdf_path_rectangle (&info, &box); } else { status = _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, _cairo_pdf_path_move_to, _cairo_pdf_path_line_to, _cairo_pdf_path_curve_to, diff --git a/src/cairo-qt-surface.cpp b/src/cairo-qt-surface.cpp index 5b61b422..7e528a30 100644 --- a/src/cairo-qt-surface.cpp +++ b/src/cairo-qt-surface.cpp @@ -391,7 +391,6 @@ path_to_qt (cairo_path_fixed_t *path, data.ctm_inverse = ctm_inverse; status = _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, _cairo_path_to_qpainterpath_move_to, _cairo_path_to_qpainterpath_line_to, _cairo_path_to_qpainterpath_curve_to, diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c index c86d913d..a3408653 100644 --- a/src/cairo-quartz-surface.c +++ b/src/cairo-quartz-surface.c @@ -359,7 +359,6 @@ _cairo_quartz_cairo_path_to_quartz_context (cairo_path_fixed_t *path, CGContextBeginPath (closure); status = _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, _cairo_path_to_quartz_context_move_to, _cairo_path_to_quartz_context_line_to, _cairo_path_to_quartz_context_curve_to, diff --git a/src/cairo-recording-surface.c b/src/cairo-recording-surface.c index 3e4dd0cc..f5f10143 100644 --- a/src/cairo-recording-surface.c +++ b/src/cairo-recording-surface.c @@ -801,7 +801,7 @@ _cairo_recording_surface_get_path (cairo_surface_t *surface, case CAIRO_COMMAND_FILL: { status = _cairo_path_fixed_append (path, - &command->fill.path, CAIRO_DIRECTION_FORWARD, + &command->fill.path, 0, 0); break; } diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c index 12d8ceac..70ecda2c 100644 --- a/src/cairo-scaled-font.c +++ b/src/cairo-scaled-font.c @@ -2494,7 +2494,7 @@ _cairo_scaled_font_glyph_path (cairo_scaled_font_t *scaled_font, &scaled_glyph); if (status == CAIRO_STATUS_SUCCESS) { status = _cairo_path_fixed_append (path, - scaled_glyph->path, CAIRO_DIRECTION_FORWARD, + scaled_glyph->path, _cairo_fixed_from_double (glyphs[i].x), _cairo_fixed_from_double (glyphs[i].y)); diff --git a/src/cairo-script-surface.c b/src/cairo-script-surface.c index 6da7ae5e..b3aa69df 100644 --- a/src/cairo-script-surface.c +++ b/src/cairo-script-surface.c @@ -1666,7 +1666,6 @@ _emit_path (cairo_script_surface_t *surface, return status; status = _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, _path_move_to, _path_line_to, _path_curve_to, diff --git a/src/cairo-skia-surface.cpp b/src/cairo-skia-surface.cpp index 8ce5a76f..e29f0220 100644 --- a/src/cairo-skia-surface.cpp +++ b/src/cairo-skia-surface.cpp @@ -500,7 +500,6 @@ path_to_sk (cairo_path_fixed_t *path, data.matrix = mat; status = _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, cpc_move_to, cpc_line_to, cpc_curve_to, diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c index 96281664..ab0f0c7d 100644 --- a/src/cairo-svg-surface.c +++ b/src/cairo-svg-surface.c @@ -725,7 +725,6 @@ _cairo_svg_surface_emit_path (cairo_output_stream_t *output, info.output = output; info.ctm_inverse = ctm_inverse; status = _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, _cairo_svg_path_move_to, _cairo_svg_path_line_to, _cairo_svg_path_curve_to, diff --git a/src/cairo-type1-fallback.c b/src/cairo-type1-fallback.c index 62ffe927..39bc53ff 100644 --- a/src/cairo-type1-fallback.c +++ b/src/cairo-type1-fallback.c @@ -407,7 +407,6 @@ cairo_type1_font_create_charstring (cairo_type1_font_t *font, path_info.type = type; if (emit_path) { status = _cairo_path_fixed_interpret (scaled_glyph->path, - CAIRO_DIRECTION_FORWARD, _charstring_move_to, _charstring_line_to, _charstring_curve_to, diff --git a/src/cairo-vg-surface.c b/src/cairo-vg-surface.c index a35c517a..39059f68 100644 --- a/src/cairo-vg-surface.c +++ b/src/cairo-vg-surface.c @@ -588,7 +588,6 @@ _vg_path_from_cairo (vg_path_t *vg_path, vg_path->dcount = 0; status = _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, _vg_move_to, _vg_line_to, _vg_curve_to, diff --git a/src/cairo-win32-printing-surface.c b/src/cairo-win32-printing-surface.c index 806cab85..4d472b0d 100644 --- a/src/cairo-win32-printing-surface.c +++ b/src/cairo-win32-printing-surface.c @@ -1087,7 +1087,6 @@ _cairo_win32_printing_surface_emit_path (cairo_win32_surface_t *surface, path_info.surface = surface; return _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, _cairo_win32_printing_surface_path_move_to, _cairo_win32_printing_surface_path_line_to, _cairo_win32_printing_surface_path_curve_to, diff --git a/src/cairo-xml-surface.c b/src/cairo-xml-surface.c index 5f0f13b0..0f258520 100644 --- a/src/cairo-xml-surface.c +++ b/src/cairo-xml-surface.c @@ -421,7 +421,6 @@ _cairo_xml_emit_path (cairo_xml_t *xml, _cairo_xml_printf_start (xml, "<path>"); status = _cairo_path_fixed_interpret (path, - CAIRO_DIRECTION_FORWARD, _cairo_xml_move_to, _cairo_xml_line_to, _cairo_xml_curve_to, diff --git a/src/cairoint.h b/src/cairoint.h index c40dc9b7..8a0fcaa1 100644 --- a/src/cairoint.h +++ b/src/cairoint.h @@ -1234,7 +1234,6 @@ typedef cairo_status_t cairo_private cairo_status_t _cairo_path_fixed_interpret (const 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, @@ -1243,7 +1242,6 @@ _cairo_path_fixed_interpret (const cairo_path_fixed_t *path, cairo_private cairo_status_t _cairo_path_fixed_interpret_flat (const 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_close_path_func_t *close_path, |