summaryrefslogtreecommitdiffstats
path: root/drawinglayer
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-01-15 08:19:38 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-13 15:56:09 +0100
commite08407052f556c981e533f532815125769212685 (patch)
tree3f4cb670c66ac473a6665cf6fb12eba5ba0223e2 /drawinglayer
parentResolves: #i122529# only check position protection when... (diff)
downloadcore-e08407052f556c981e533f532815125769212685.tar.gz
core-e08407052f556c981e533f532815125769212685.zip
Resolves: #i121534# only handle bitmaps which are inside visible area
(cherry picked from commit ad026d3b68d5d0d527eed591b3c6f8247bec641b) Change-Id: I2f4ca680a003e1c58d9cbefa3bee81bcc117916b
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/vclhelperbitmaprender.cxx9
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx23
2 files changed, 26 insertions, 6 deletions
diff --git a/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx b/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
index 598b7d18a6bf..4e67fa7ba41b 100644
--- a/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
+++ b/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
@@ -74,7 +74,14 @@ namespace drawinglayer
}
// draw bitmap
- rOutDev.DrawBitmapEx(aPoint, aSize, aContent);
+ if(aSize == aContent.GetSizePixel())
+ {
+ rOutDev.DrawBitmapEx(aPoint, aContent);
+ }
+ else
+ {
+ rOutDev.DrawBitmapEx(aPoint, aSize, aContent);
+ }
}
void RenderBitmapPrimitive2D_self(
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);