summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2009-09-05 23:58:47 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2009-09-05 23:58:47 +0000
commitef549e445f821e4472c71d1c43f3738c7857bafc (patch)
tree914b35dc44d4cfdefeab8511ac6ee6a580229a06 /src
parentpatch by Adrian Johnson for 166678 (diff)
downloadinkscape-ef549e445f821e4472c71d1c43f3738c7857bafc.tar.gz
inkscape-ef549e445f821e4472c71d1c43f3738c7857bafc.zip
patch by Adib for 406470
(bzr r8562)
Diffstat (limited to 'src')
-rw-r--r--src/extension/internal/cairo-render-context.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp
index d1462e52e..364dfcfa8 100644
--- a/src/extension/internal/cairo-render-context.cpp
+++ b/src/extension/internal/cairo-render-context.cpp
@@ -192,6 +192,8 @@ CairoRenderContext::cloneMe(double width, double height) const
(int)ceil(width), (int)ceil(height));
new_context->_cr = cairo_create(surface);
new_context->_surface = surface;
+ new_context->_width = width;
+ new_context->_height = height;
new_context->_is_valid = TRUE;
return new_context;
@@ -749,6 +751,9 @@ CairoRenderContext::setupSurface(double width, double height)
if (_vector_based_target && _stream == NULL)
return false;
+ _width = width;
+ _height = height;
+
cairo_surface_t *surface = NULL;
switch (_target) {
case CAIRO_SURFACE_TYPE_IMAGE:
@@ -796,13 +801,16 @@ bool
CairoRenderContext::_finishSurfaceSetup(cairo_surface_t *surface, cairo_matrix_t *ctm)
{
if(surface == NULL) {
- return FALSE;
+ return false;
}
if(CAIRO_STATUS_SUCCESS != cairo_surface_status(surface)) {
- return FALSE;
+ return false;
}
_cr = cairo_create(surface);
+ if(CAIRO_STATUS_SUCCESS != cairo_status(_cr)) {
+ return false;
+ }
if (ctm)
cairo_set_matrix(_cr, ctm);
_surface = surface;