Author: alg
Date: Tue Jan 15 09:19:38 2013
New Revision: 1433317
URL: http://svn.apache.org/viewvc?rev=1433317&view=rev
Log:
#121534# only handle bitmaps which are inside visible area
Modified:
openoffice/trunk/main/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
openoffice/trunk/main/drawinglayer/source/processor2d/vclprocessor2d.cxx
Modified:
openoffice/trunk/main/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx?rev=1433317&r1=1433316&r2=1433317&view=diff
==============================================================================
---
openoffice/trunk/main/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
(original)
+++
openoffice/trunk/main/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
Tue Jan 15 09:19:38 2013
@@ -81,7 +81,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(
Modified:
openoffice/trunk/main/drawinglayer/source/processor2d/vclprocessor2d.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/drawinglayer/source/processor2d/vclprocessor2d.cxx?rev=1433317&r1=1433316&r2=1433317&view=diff
==============================================================================
--- openoffice/trunk/main/drawinglayer/source/processor2d/vclprocessor2d.cxx
(original)
+++ openoffice/trunk/main/drawinglayer/source/processor2d/vclprocessor2d.cxx
Tue Jan 15 09:19:38 2013
@@ -389,10 +389,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());
- BitmapEx aBitmapEx(rBitmapCandidate.getBitmapEx());
- bool bPainted(false);
+ // 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());
if(maBColorModifierStack.count())
{
@@ -409,11 +423,10 @@ namespace drawinglayer
mpOutputDevice->SetLineColor();
mpOutputDevice->DrawPolygon(aPolygon);
- bPainted = true;
+ return;
}
}
- if(!bPainted)
{
static bool bForceUseOfOwnTransformer(false);