summaryrefslogtreecommitdiffstats
path: root/src/display/nr-arena-shape.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/display/nr-arena-shape.cpp')
-rw-r--r--src/display/nr-arena-shape.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/display/nr-arena-shape.cpp b/src/display/nr-arena-shape.cpp
index ff87b5134..9bece05b5 100644
--- a/src/display/nr-arena-shape.cpp
+++ b/src/display/nr-arena-shape.cpp
@@ -396,22 +396,21 @@ nr_arena_shape_render(cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock
static guint nr_arena_shape_clip(cairo_t *ct, NRArenaItem *item, NRRectL * /*area*/)
{
- guint result = 0;
-
- // NOTE: for now this is incorrect, because it doesn't honor clip-rule,
- // and will be incorrect for nested clipping paths.
NRArenaShape *shape = NR_ARENA_SHAPE(item);
if (!shape->curve) {
- result = item->state;
- } else {
- cairo_save(ct);
- ink_cairo_transform(ct, shape->ctm);
- feed_pathvector_to_cairo(ct, shape->curve->get_pathvector());
- cairo_restore(ct);
-
- result = item->state;
+ return item->state;
}
- return result;
+
+ // TODO: Handling of the clip-rule property / CSS attribute.
+ // Once the required bits are in SPStyle, this is as trivial as adding a single
+ // call to cairo_set_fill_rule() before cairo_fill().
+ cairo_save(ct);
+ ink_cairo_transform(ct, shape->ctm);
+ feed_pathvector_to_cairo(ct, shape->curve->get_pathvector());
+ cairo_fill(ct);
+ cairo_restore(ct);
+
+ return item->state;
}
static NRArenaItem *