diff options
Diffstat (limited to 'drawinglayer/source/processor2d/vclprocessor2d.cxx')
-rw-r--r-- | drawinglayer/source/processor2d/vclprocessor2d.cxx | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 533f2c28c1c0..759454a98400 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -415,10 +415,24 @@ namespace drawinglayer // direct draw of transformed BitmapEx primitive void VclProcessor2D::RenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate) { - // create local transform - basegfx::B2DHomMatrix aLocalTransform(maCurrentTransformation * rBitmapCandidate.getTransform()); + // 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()); - bool bPainted(false); if(maBColorModifierStack.count()) { @@ -435,11 +449,10 @@ namespace drawinglayer mpOutputDevice->SetLineColor(); mpOutputDevice->DrawPolygon(aPolygon); - bPainted = true; + return; } } - if(!bPainted) { static bool bForceUseOfOwnTransformer(false); |