[cairo-commit] 3 commits - src/cairo-gstate.c src/cairo-path-stroke-traps.c src/cairo-xlib-source.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Jan 9 04:51:20 PST 2013
src/cairo-gstate.c | 24 ++++++++++++------------
src/cairo-path-stroke-traps.c | 2 ++
src/cairo-xlib-source.c | 3 ++-
3 files changed, 16 insertions(+), 13 deletions(-)
New commits:
commit dd20c1f4d6419238bbb37fb93a48986f83c6e6c2
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jan 9 12:38:09 2013 +0000
xlib: map-to-image requires an extents
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-xlib-source.c b/src/cairo-xlib-source.c
index d08052a..0689d82 100644
--- a/src/cairo-xlib-source.c
+++ b/src/cairo-xlib-source.c
@@ -968,8 +968,9 @@ surface_source (cairo_xlib_surface_t *dst,
0, 0);
} else {
cairo_image_surface_t *image;
+ cairo_rectangle_int_t map_extents = { 0,0, upload.width,upload.height };
- image = _cairo_surface_map_to_image (&xsrc->base, NULL);
+ image = _cairo_surface_map_to_image (&xsrc->base, &map_extents);
_cairo_pattern_init_for_surface (&local_pattern, pattern->surface);
cairo_matrix_init_translate (&local_pattern.base.matrix,
commit 351a9e756d0863ae7408c6d43a622620daa0c354
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jan 9 12:31:10 2013 +0000
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 at chris-wilson.co.uk>
diff --git a/src/cairo-path-stroke-traps.c b/src/cairo-path-stroke-traps.c
index c9f7371..304dea7 100644
--- a/src/cairo-path-stroke-traps.c
+++ b/src/cairo-path-stroke-traps.c
@@ -918,6 +918,8 @@ spline_to (void *closure,
face.usr_vector.x = -face.usr_vector.x;
face.usr_vector.y = -face.usr_vector.y;
+ face.dev_slope.x = -face.dev_slope.x;
+ face.dev_slope.y = -face.dev_slope.y;
face.dev_vector.dx = -face.dev_vector.dx;
face.dev_vector.dy = -face.dev_vector.dy;
commit 14720cd0dbc325a2140fbd5b2a7ce4b257ae5f5e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Jan 9 12:11:25 2013 +0000
gstate: Use the polygon intermediate for geometry queries
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
index c90f2f6..6319471 100644
--- a/src/cairo-gstate.c
+++ b/src/cairo-gstate.c
@@ -1235,12 +1235,12 @@ _cairo_gstate_in_stroke (cairo_gstate_t *gstate,
_cairo_traps_init (&traps);
_cairo_traps_limit (&traps, &limit, 1);
- status = _cairo_path_fixed_stroke_to_traps (path,
- &gstate->stroke_style,
- &gstate->ctm,
- &gstate->ctm_inverse,
- gstate->tolerance,
- &traps);
+ status = _cairo_path_fixed_stroke_polygon_to_traps (path,
+ &gstate->stroke_style,
+ &gstate->ctm,
+ &gstate->ctm_inverse,
+ gstate->tolerance,
+ &traps);
if (unlikely (status))
goto BAIL;
@@ -1465,12 +1465,12 @@ _cairo_gstate_stroke_extents (cairo_gstate_t *gstate,
cairo_traps_t traps;
_cairo_traps_init (&traps);
- status = _cairo_path_fixed_stroke_to_traps (path,
- &gstate->stroke_style,
- &gstate->ctm,
- &gstate->ctm_inverse,
- gstate->tolerance,
- &traps);
+ status = _cairo_path_fixed_stroke_polygon_to_traps (path,
+ &gstate->stroke_style,
+ &gstate->ctm,
+ &gstate->ctm_inverse,
+ gstate->tolerance,
+ &traps);
empty = traps.num_traps == 0;
if (! empty)
_cairo_traps_extents (&traps, &extents);
More information about the cairo-commit
mailing list