diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2019-10-19 04:33:22 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2019-10-19 04:33:22 +0000 |
| commit | 2d7e690eb6a2add552b84370d56d56ec1b1fbfd4 (patch) | |
| tree | f5b76e1fbe3e2cf144d24697ce37018bf0401b86 /src/extension/internal/cairo-render-context.cpp | |
| parent | Update hr.po for Inkscape 1.0 (diff) | |
| download | inkscape-2d7e690eb6a2add552b84370d56d56ec1b1fbfd4.tar.gz inkscape-2d7e690eb6a2add552b84370d56d56ec1b1fbfd4.zip | |
Add export/import PDF blend modes and add isolation modifier
Diffstat (limited to 'src/extension/internal/cairo-render-context.cpp')
| -rw-r--r-- | src/extension/internal/cairo-render-context.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index adc4f1eb5..a1e5b91a8 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -1569,6 +1569,9 @@ CairoRenderContext::renderPathVector(Geom::PathVector const & pathv, SPStyle con } else { cairo_set_fill_rule(_cr, CAIRO_FILL_RULE_WINDING); } + if (style->mix_blend_mode.set && style->mix_blend_mode.value) { + cairo_set_operator(_cr, ink_css_blend_to_cairo_operator(style->mix_blend_mode.value)); + } cairo_fill(_cr); TEST(cairo_surface_write_to_png (_surface, "pathmask.png")); } @@ -1599,6 +1602,10 @@ CairoRenderContext::renderPathVector(Geom::PathVector const & pathv, SPStyle con } } + if (style->mix_blend_mode.set && style->mix_blend_mode.value) { + cairo_set_operator(_cr, ink_css_blend_to_cairo_operator(style->mix_blend_mode.value)); + } + setPathVector(pathv); if (!no_fill && (order == STROKE_OVER_FILL || order == FILL_ONLY)) { @@ -1695,6 +1702,10 @@ bool CairoRenderContext::renderImage(Inkscape::Pixbuf *pb, } } + if (style->mix_blend_mode.set && style->mix_blend_mode.value) { + cairo_set_operator(_cr, ink_css_blend_to_cairo_operator(style->mix_blend_mode.value)); + } + cairo_paint(_cr); cairo_restore(_cr); @@ -1825,6 +1836,10 @@ CairoRenderContext::renderGlyphtext(PangoFont *font, Geom::Affine const &font_ma stroke = true; } + if (style->mix_blend_mode.set && style->mix_blend_mode.value) { + cairo_set_operator(_cr, (cairo_operator_t)style->mix_blend_mode.value); + } + // Text never has markers bool stroke_over_fill = true; if ( (style->paint_order.layer[0] == SP_CSS_PAINT_ORDER_STROKE && |
