diff options
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()) { |