diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-12-11 16:20:49 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-12-11 20:44:26 +0000 |
commit | f95b0743da4239e047db8638c61f90f8bbe54306 (patch) | |
tree | ab0f0a4cf2fa995c34da5403a55a105691a00c34 /canvas | |
parent | 5a410df4ff5edd9ea2fbe5469084bb0e8b57bd1c (diff) |
Related: fdo#87242 init VirtualDevice with size of surface
otherwise vcl's clipping doesn't work quite right when the render text
with vcl apis fallback is used.
Manually forced in my case, but it should happen in practice with vertical
text, so if there is a bug about vertical text not appearing in slideshows then
this is part of the fix for that.
Windows and Mac remain unchanged as initialized with 1, 1. If the same problem
affects those platforms then they'll need to be adjusted to remember their
height/widths from the ctor and those values plugged in here instead
Change-Id: I2f82f0db0cf446d7db21f0a7ee4f8c15c7ebdb42
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/cairo/cairo_quartz_cairo.cxx | 2 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_win32_cairo.cxx | 2 | ||||
-rw-r--r-- | canvas/source/cairo/cairo_xlib_cairo.cxx | 7 |
3 files changed, 8 insertions, 3 deletions
diff --git a/canvas/source/cairo/cairo_quartz_cairo.cxx b/canvas/source/cairo/cairo_quartz_cairo.cxx index 390402a9bde5..b87b993ea532 100644 --- a/canvas/source/cairo/cairo_quartz_cairo.cxx +++ b/canvas/source/cairo/cairo_quartz_cairo.cxx @@ -269,7 +269,7 @@ namespace cairo aSystemGraphicsData.nSize = sizeof(SystemGraphicsData); aSystemGraphicsData.rCGContext = getCGContext(); return boost::shared_ptr<VirtualDevice>( - new VirtualDevice( &aSystemGraphicsData, getDepth() )); + new VirtualDevice( &aSystemGraphicsData, Size(1, 1), getDepth() )); } /** diff --git a/canvas/source/cairo/cairo_win32_cairo.cxx b/canvas/source/cairo/cairo_win32_cairo.cxx index 8d4a4d2ff680..6e1cf6f2f6dd 100644 --- a/canvas/source/cairo/cairo_win32_cairo.cxx +++ b/canvas/source/cairo/cairo_win32_cairo.cxx @@ -197,7 +197,7 @@ namespace cairo aSystemGraphicsData.hDC = cairo_win32_surface_get_dc( mpSurface.get() ); return boost::shared_ptr<VirtualDevice>( - new VirtualDevice( &aSystemGraphicsData, sal::static_int_cast<USHORT>(getDepth()) )); + new VirtualDevice( &aSystemGraphicsData, Size(1, 1), sal::static_int_cast<USHORT>(getDepth()) )); } diff --git a/canvas/source/cairo/cairo_xlib_cairo.cxx b/canvas/source/cairo/cairo_xlib_cairo.cxx index a9e2069f1122..ae9cecb93789 100644 --- a/canvas/source/cairo/cairo_xlib_cairo.cxx +++ b/canvas/source/cairo/cairo_xlib_cairo.cxx @@ -278,8 +278,13 @@ namespace cairo aSystemGraphicsData.hDrawable = getDrawable(); aSystemGraphicsData.pXRenderFormat = getRenderFormat(); + int width = cairo_xlib_surface_get_width(mpSurface.get()); + int height = cairo_xlib_surface_get_height(mpSurface.get()); + return boost::shared_ptr<VirtualDevice>( - new VirtualDevice( &aSystemGraphicsData, std::max( getDepth(), 0 ) )); + new VirtualDevice(&aSystemGraphicsData, + Size(width, height), + std::max(getDepth(), 0))); } /** |