From: tavmjong Date: Wed, 10 Sep 2008 13:26:52 +0000 (+0000) Subject: Fix clipping for Cairo generated PNG's. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5c5a462be505a1d230d221d2865ef52a3488985c;p=inkscape.git Fix clipping for Cairo generated PNG's. --- diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index e2e154791..f2ee32c74 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -590,13 +590,16 @@ CairoRenderContext::popLayer(void) cairo_set_source_rgba(clip_ctx->_cr, 1.0, 1.0, 1.0, 1.0); // copy over the correct CTM + // It must be stored in item_transform of current state after pushState. + Geom::Matrix item_transform; if (_state->parent_has_userspace) - clip_ctx->setTransform(&getParentState()->transform); + item_transform = getParentState()->transform; else - clip_ctx->setTransform(&_state->transform); + item_transform = _state->transform; // apply the clip path clip_ctx->pushState(); + clip_ctx->getCurrentState()->item_transform = item_transform; _renderer->applyClipPath(clip_ctx, clip_path); clip_ctx->popState();