diff options
author | Armin Le Grand <alg@apache.org> | 2013-05-06 14:13:44 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-15 16:38:00 +0100 |
commit | 16bb8dc8a0e1e797cac0f89d306b020b8534a8c4 (patch) | |
tree | fbb369526abc9ce16572b3611764fa7ff8826f2e /drawinglayer | |
parent | 8aa86a712e8d6a97d32b70b5c1f88d2d484cafb2 (diff) |
Resolves: #i122216# Ensure FormControls get printed/PDFed
also ensure graphics are all visible in metafiles
(cherry picked from commit f3695b261c9fb6f7053b325bd25dc43f578b32fe)
Change-Id: I70dcf53e56f883a8c28c85c410d3c9f0d1d4bbe1
Diffstat (limited to 'drawinglayer')
3 files changed, 24 insertions, 18 deletions
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 378961fbdcea..e7c43b8fe399 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -1356,7 +1356,10 @@ namespace drawinglayer } case PRIMITIVE2D_ID_BITMAPPRIMITIVE2D : { - // direct draw of transformed BitmapEx primitive; use default processing + // direct draw of transformed BitmapEx primitive; use default processing, but without + // former testing if graphic content is inside discrete local viewport; this is not + // setup for metafile targets (metafile renderer tries to render in logic coordinates, + // the mapping is kept to the OutputDevice for better Metafile recording) RenderBitmapPrimitive2D(static_cast< const primitive2d::BitmapPrimitive2D& >(rCandidate)); break; } diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index fdf3e684c094..fcbd44c3fe8d 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -176,6 +176,25 @@ namespace drawinglayer case PRIMITIVE2D_ID_BITMAPPRIMITIVE2D : { // direct draw of transformed BitmapEx primitive + const primitive2d::BitmapPrimitive2D& rBitmapCandidate = static_cast< const primitive2d::BitmapPrimitive2D& >(rCandidate); + + // check if graphic content is inside discrete local ViewPort + const basegfx::B2DRange& rDiscreteViewPort(getViewInformation2D().getDiscreteViewport()); + const basegfx::B2DHomMatrix aLocalTransform(maCurrentTransformation * rBitmapCandidate.getTransform()); + + if(!rDiscreteViewPort.isEmpty()) + { + basegfx::B2DRange aUnitRange(0.0, 0.0, 1.0, 1.0); + + aUnitRange.transform(aLocalTransform); + + if(!aUnitRange.overlaps(rDiscreteViewPort)) + { + // content is outside discrete local ViewPort + break; + } + } + RenderBitmapPrimitive2D(static_cast< const primitive2d::BitmapPrimitive2D& >(rCandidate)); break; } diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 56d56b73b4ac..e125f46bb592 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -413,24 +413,8 @@ namespace drawinglayer // direct draw of transformed BitmapEx primitive void VclProcessor2D::RenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate) { - // check local ViewPort - const basegfx::B2DRange& rDiscreteViewPort(getViewInformation2D().getDiscreteViewport()); - const basegfx::B2DHomMatrix aLocalTransform(maCurrentTransformation * rBitmapCandidate.getTransform()); - - if(!rDiscreteViewPort.isEmpty()) - { - // check if we are visible - basegfx::B2DRange aUnitRange(0.0, 0.0, 1.0, 1.0); - - aUnitRange.transform(aLocalTransform); - - if(!aUnitRange.overlaps(rDiscreteViewPort)) - { - return; - } - } - BitmapEx aBitmapEx(rBitmapCandidate.getBitmapEx()); + const basegfx::B2DHomMatrix aLocalTransform(maCurrentTransformation * rBitmapCandidate.getTransform()); if(maBColorModifierStack.count()) { |