mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 10:18:02 +02:00
Revert "[path] Convert straight curve-to to line-to"
This reverts commit c72ca2f229.
This commit was broken as verified by the curve-to-as-line-to test
case.
This commit is contained in:
parent
5bed405b27
commit
45919a4f0c
1 changed files with 0 additions and 12 deletions
|
|
@ -488,7 +488,6 @@ _cairo_path_fixed_curve_to (cairo_path_fixed_t *path,
|
|||
{
|
||||
cairo_status_t status;
|
||||
cairo_point_t point[3];
|
||||
cairo_slope_t slope, tangent;
|
||||
|
||||
/* make sure subpaths are started properly */
|
||||
if (! path->has_current_point) {
|
||||
|
|
@ -503,17 +502,6 @@ _cairo_path_fixed_curve_to (cairo_path_fixed_t *path,
|
|||
point[0].x = x0; point[0].y = y0;
|
||||
point[1].x = x1; point[1].y = y1;
|
||||
point[2].x = x2; point[2].y = y2;
|
||||
|
||||
_cairo_slope_init (&slope, &path->current_point, &point[2]);
|
||||
_cairo_slope_init (&tangent, &path->current_point, &point[0]);
|
||||
if (_cairo_slope_compare (&slope, &tangent) == 0) {
|
||||
_cairo_slope_init (&tangent, &point[1], &point[2]);
|
||||
if (_cairo_slope_compare (&slope, &tangent) == 0) {
|
||||
/* just a straight line... */
|
||||
return _cairo_path_fixed_line_to (path, x2, y2);
|
||||
}
|
||||
}
|
||||
|
||||
status = _cairo_path_fixed_add (path, CAIRO_PATH_OP_CURVE_TO, point, 3);
|
||||
if (unlikely (status))
|
||||
return status;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue