simplify some BitmapEx constructions
using the color bitmap __and__ the alpha from another BitmapEx is equivalent to just doing a straight copy/assign Change-Id: I134ab8a1197ed538823afc4a8cd28b3d5986c6b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160019 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
1ca6f51567
commit
f4edd6258d
@ -994,10 +994,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
|
|||||||
if ( aBitmapEx.GetSizePixel().Width() && aBitmapEx.GetSizePixel().Height() )
|
if ( aBitmapEx.GetSizePixel().Width() && aBitmapEx.GetSizePixel().Height() )
|
||||||
{
|
{
|
||||||
ImpMask( aBitmapEx );
|
ImpMask( aBitmapEx );
|
||||||
if ( aGraphic.IsTransparent() )
|
aGraphic = Graphic( aBitmapEx );
|
||||||
aGraphic = Graphic( BitmapEx( aBitmapEx.GetBitmap(), aBitmapEx.GetAlphaMask() ) );
|
|
||||||
else
|
|
||||||
aGraphic = aBitmapEx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -457,7 +457,7 @@ void GraphicObject::ImplTransformBitmap( BitmapEx& rBmpEx,
|
|||||||
|
|
||||||
if( rBmpEx.IsAlpha() )
|
if( rBmpEx.IsAlpha() )
|
||||||
{
|
{
|
||||||
aBmpEx2 = BitmapEx( rBmpEx.GetBitmap(), rBmpEx.GetAlphaMask() );
|
aBmpEx2 = rBmpEx;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -269,7 +269,7 @@ BitmapEx GetBitmapEx(BitmapEx const& rBitmapEx, DrawModeFlags nDrawMode)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aBmpEx = BitmapEx(aColorBmp, aBmpEx.GetAlphaMask());
|
aBmpEx = BitmapEx(aColorBmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1406,8 +1406,7 @@ public:
|
|||||||
rDev.DrawBitmap(aBelow, aGrey);
|
rDev.DrawBitmap(aBelow, aGrey);
|
||||||
|
|
||||||
aBelow.Move(aGrey.GetSizePixel().Width(),0);
|
aBelow.Move(aGrey.GetSizePixel().Width(),0);
|
||||||
BitmapEx aGreyMask(aSrc.GetBitmap(),
|
BitmapEx aGreyMask(aSrc);
|
||||||
aSrc.GetAlphaMask());
|
|
||||||
rDev.DrawBitmapEx(aBelow, aGreyMask);
|
rDev.DrawBitmapEx(aBelow, aGreyMask);
|
||||||
|
|
||||||
aLocation.Move(aSrc.GetSizePixel().Width()*6,0);
|
aLocation.Move(aSrc.GetSizePixel().Width()*6,0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user