Commit graph

10 commits

Author SHA1 Message Date
Christian Rohlfs
e83776572c Round joins fix (spline_cusp_tolerance)
https://gitlab.freedesktop.org/cairo/cairo/-/issues/520
2022-12-28 07:25:30 +05:00
Adrian Johnson
ba3823e6b8 Fix cast between incompatible function types warnings
warning: cast between incompatible function types from ‘cairo_status_t (*)(void *, const cairo_point_t *)’ {aka ‘enum _cairo_status (*)(void *, const struct _cairo_point *)’} to ‘cairo_status_t (*)(void *, const cairo_point_t *, const cairo_slope_t *)’ {aka ‘enum _cairo_status (*)(void *, const struct _cairo_point *, const struct _cairo_slope *)’} [-Wcast-function-type]
2021-08-22 12:07:36 +09:30
George Matsumura
ed98414686 build: Fix various compiler warnings
This fixes a few compiler warnings that were encountered with gcc 9.3.0.

Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
2020-11-07 06:45:01 -07:00
Uli Schlachter
9d44136ef8 Revert "stroker: Check for scaling overflow in computing half line widths"
This reverts commit 91b25005d6 because it
causes lots of new crashes due to assertion failures.
2017-05-13 09:37:34 +02:00
Chris Wilson
91b25005d6 stroker: Check for scaling overflow in computing half line widths
Given a combination of a large scaling matrix and a large line, we can
easily generate a half line width that is unrepresentable in our 24.8
fixed-point. This leads to spurious errors later, such as generating
negative height boxes, and so asking pixman to fill to infinity. To
avoid this, we can check for overflow in calculating the half line with,
though we still lack adequate range checking on the final stroke path.

References: https://bugs.webkit.org/show_bug.cgi?id=16793
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: magomez@igalia.com
Tested-by: Bryce Harrington <bryce@osg.samsung.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
2017-05-04 17:44:48 -07:00
Hans Breuer
56da7adc3c win32: Fix compilation of 'cairo-path-stroke-traps.c' with MSVC8
"The issue here is that Visual Studio 2005+ is quite strict on type
conversions (so it wants code to be clear enough on conversions)."

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=84908
2014-11-20 12:26:52 -08:00
Chris Wilson
06b9f8fa2d stroke,traps: Emit join without loss of precision
As the target renderers operate at a different sample resolution then we
use internally for coordinate representation, there is always a potential
for discrepancies in the line gradients when passing around trapezoids.
To overcome this, the protocol specification of trapezoids uses the full
lines and vertical range as opposed to vertices and so long as we always
use the same lines for conjoint trapezoids, they remain abutting in the
rasteriser.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84115
Testcase: bug-84115
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-29 08:42:17 +01:00
egag
b9263fea14 Fixes stroke-clipped, i.c. of a dashed stroke
Similar to 1f4d05b55c
 'Fix calling '_cairo_spline_intersect' for in-bounds checking of splines'

Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2013-10-31 20:33:33 -07:00
Chris Wilson
351a9e756d stroke: Flip the dev slope as well for computing the cusp on a degeneracy
Otherwise, the join think it starts and end in exactly the same
direction and elimiates the round capping.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-09 12:31:10 +00:00
Chris Wilson
5bc1b1f6aa stroke: Make the incremental trapezoid stroker optionally available again
Whilst it cannot handle self-intersecting strokes (which includes the
antialias region of neighbouring lines and joints), it is about 3x
faster to use than the more robust algorithm. As some backends delegate
the rendering, the quality may still be preserved and so they should be
responsible for choosing the appropriate method for generation of the
stroke geometry.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-03 15:07:18 +00:00