diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2010-08-11 22:40:33 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2010-08-11 22:40:33 +0000 |
| commit | 2eceacbf55b5796e4449fb3efc85cffdf5b6303c (patch) | |
| tree | 1b239420000898525e45c9e1326c50eaee36fb67 /src | |
| parent | Fix rendering of masks with non-opaque alpha channel (diff) | |
| download | inkscape-2eceacbf55b5796e4449fb3efc85cffdf5b6303c.tar.gz inkscape-2eceacbf55b5796e4449fb3efc85cffdf5b6303c.zip | |
Fix rendering failures caused by markers with markerUnits="strokeWidth"
on shapes with zero stroke width
(bzr r9508.1.56)
Diffstat (limited to 'src')
| -rw-r--r-- | src/display/nr-arena-shape.cpp | 3 | ||||
| -rw-r--r-- | src/marker.cpp | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/display/nr-arena-shape.cpp b/src/display/nr-arena-shape.cpp index 8a2b27f4f..550195c7c 100644 --- a/src/display/nr-arena-shape.cpp +++ b/src/display/nr-arena-shape.cpp @@ -370,6 +370,7 @@ nr_arena_shape_render(cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock // to render svg:pattern has_fill = shape->nrstyle.prepareFill(ct, &shape->paintbox); has_stroke = shape->nrstyle.prepareStroke(ct, &shape->paintbox); + has_stroke &= (shape->nrstyle.stroke_width != 0); if (has_fill || has_stroke) { // TODO: remove segments outside of bbox when no dashes present @@ -387,7 +388,7 @@ nr_arena_shape_render(cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock cairo_restore(ct); } - /* Render markers into parent buffer */ + // marker rendering for (NRArenaItem *child = shape->markers; child != NULL; child = child->next) { unsigned int ret = nr_arena_item_invoke_render(ct, child, area, pb, flags); if (ret & NR_ARENA_ITEM_STATE_INVALID) return ret; diff --git a/src/marker.cpp b/src/marker.cpp index 6917c0b71..f89dd2bc0 100644 --- a/src/marker.cpp +++ b/src/marker.cpp @@ -614,6 +614,13 @@ sp_marker_show_instance ( SPMarker *marker, NRArenaItem *parent, unsigned int key, unsigned int pos, Geom::Matrix const &base, float linewidth) { + // do not show marker if linewidth == 0 and markerUnits == strokeWidth + // otherwise Cairo will fail to render anything on the tile + // that contains the "degenerate" marker + if (marker->markerUnits == SP_MARKER_UNITS_STROKEWIDTH && linewidth == 0) { + return NULL; + } + for (SPMarkerView *v = marker->views; v != NULL; v = v->next) { if (v->key == key) { if (pos >= v->items.size()) { |
