diff options
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/cairo/cairo_devicehelper.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/canvas/source/cairo/cairo_devicehelper.cxx b/canvas/source/cairo/cairo_devicehelper.cxx index fab8b1b0e754..05266e424457 100644 --- a/canvas/source/cairo/cairo_devicehelper.cxx +++ b/canvas/source/cairo/cairo_devicehelper.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <config_features.h> - #include <canvas/debug.hxx> #include <canvas/verbosetrace.hxx> #include <canvas/canvastools.hxx> @@ -94,18 +92,20 @@ namespace cairocanvas OutputDevice* pOutDev=getOutputDevice(); -#if HAVE_FEATURE_X11 - // X11 only - if( mpSurface ) + if (mpSurface && pOutDev->CanResizeCairoSurface()) + { + // X11 only mpSurface->Resize( rSize.getX() + pOutDev->GetOutOffXPixel(), rSize.getY() + pOutDev->GetOutOffYPixel() ); + } else -#endif + { mpSurface = cairo::createSurface( *pOutDev, pOutDev->GetOutOffXPixel(), pOutDev->GetOutOffYPixel(), rSize.getX(), rSize.getY() ); + } } geometry::RealSize2D DeviceHelper::getPhysicalResolution() |