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,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(
......
......@@ -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);
......
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