Kaydet (Commit) e0840705 authored tarafından Armin Le Grand's avatar Armin Le Grand Kaydeden (comit) Caolán McNamara

Resolves: #i121534# only handle bitmaps which are inside visible area

(cherry picked from commit ad026d3b)

Change-Id: I2f4ca680a003e1c58d9cbefa3bee81bcc117916b
üst 57bf1f75
...@@ -74,8 +74,15 @@ namespace drawinglayer ...@@ -74,8 +74,15 @@ namespace drawinglayer
} }
// draw bitmap // draw bitmap
if(aSize == aContent.GetSizePixel())
{
rOutDev.DrawBitmapEx(aPoint, aContent);
}
else
{
rOutDev.DrawBitmapEx(aPoint, aSize, aContent); rOutDev.DrawBitmapEx(aPoint, aSize, aContent);
} }
}
void RenderBitmapPrimitive2D_self( void RenderBitmapPrimitive2D_self(
OutputDevice& rOutDev, OutputDevice& rOutDev,
......
...@@ -415,10 +415,24 @@ namespace drawinglayer ...@@ -415,10 +415,24 @@ namespace drawinglayer
// direct draw of transformed BitmapEx primitive // direct draw of transformed BitmapEx primitive
void VclProcessor2D::RenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate) void VclProcessor2D::RenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate)
{ {
// create local transform // check local ViewPort
basegfx::B2DHomMatrix aLocalTransform(maCurrentTransformation * rBitmapCandidate.getTransform()); 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()); BitmapEx aBitmapEx(rBitmapCandidate.getBitmapEx());
bool bPainted(false);
if(maBColorModifierStack.count()) if(maBColorModifierStack.count())
{ {
...@@ -435,11 +449,10 @@ namespace drawinglayer ...@@ -435,11 +449,10 @@ namespace drawinglayer
mpOutputDevice->SetLineColor(); mpOutputDevice->SetLineColor();
mpOutputDevice->DrawPolygon(aPolygon); mpOutputDevice->DrawPolygon(aPolygon);
bPainted = true; return;
} }
} }
if(!bPainted)
{ {
static bool bForceUseOfOwnTransformer(false); static bool bForceUseOfOwnTransformer(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment