Some cppcheck cleaning
Change-Id: Id5be3a25fc66d2f7fcec8325491a23d6908021fc
This commit is contained in:
@@ -483,7 +483,6 @@ namespace vclcanvas
|
|||||||
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
|
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
|
||||||
|
|
||||||
const int nTransparency( setupOutDevState( viewState, renderState, FILL_COLOR ) );
|
const int nTransparency( setupOutDevState( viewState, renderState, FILL_COLOR ) );
|
||||||
const int nTransPercent( (nTransparency * 100 + 128) / 255 ); // normal rounding, no truncation here
|
|
||||||
::basegfx::B2DPolyPolygon aB2DPolyPoly(
|
::basegfx::B2DPolyPolygon aB2DPolyPoly(
|
||||||
::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(xPolyPolygon));
|
::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(xPolyPolygon));
|
||||||
aB2DPolyPoly.setClosed(true); // ensure closed poly, otherwise VCL does not fill
|
aB2DPolyPoly.setClosed(true); // ensure closed poly, otherwise VCL does not fill
|
||||||
@@ -497,7 +496,8 @@ namespace vclcanvas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mpOutDev->getOutDev().DrawTransparent( aPolyPoly, (sal_uInt16)nTransPercent );
|
const sal_uInt16 nTransPercent( (nTransparency * 100 + 128) / 255 ); // normal rounding, no truncation here
|
||||||
|
mpOutDev->getOutDev().DrawTransparent( aPolyPoly, nTransPercent );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( mp2ndOutDev )
|
if( mp2ndOutDev )
|
||||||
|
@@ -683,7 +683,6 @@ namespace vclcanvas
|
|||||||
{
|
{
|
||||||
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
|
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
|
||||||
|
|
||||||
const int nTransparency( setupOutDevState( viewState, renderState, IGNORE_COLOR ) );
|
|
||||||
PolyPolygon aPolyPoly( tools::mapPolyPolygon(
|
PolyPolygon aPolyPoly( tools::mapPolyPolygon(
|
||||||
::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(xPolyPolygon),
|
::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(xPolyPolygon),
|
||||||
viewState, renderState ) );
|
viewState, renderState ) );
|
||||||
@@ -711,6 +710,7 @@ namespace vclcanvas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
const int nTransparency( setupOutDevState( viewState, renderState, IGNORE_COLOR ) );
|
||||||
std::vector< ::Color > aColors(rValues.maColors.getLength());
|
std::vector< ::Color > aColors(rValues.maColors.getLength());
|
||||||
std::transform(&rValues.maColors[0],
|
std::transform(&rValues.maColors[0],
|
||||||
&rValues.maColors[0]+rValues.maColors.getLength(),
|
&rValues.maColors[0]+rValues.maColors.getLength(),
|
||||||
|
@@ -245,13 +245,6 @@ namespace vclcanvas
|
|||||||
aSrcRect,
|
aSrcRect,
|
||||||
rTransform );
|
rTransform );
|
||||||
|
|
||||||
const bool bModulateColors( eModulationMode == MODULATE_WITH_DEVICECOLOR &&
|
|
||||||
rDeviceColor.getLength() > 2 );
|
|
||||||
const double nRedModulation( bModulateColors ? rDeviceColor[0] : 1.0 );
|
|
||||||
const double nGreenModulation( bModulateColors ? rDeviceColor[1] : 1.0 );
|
|
||||||
const double nBlueModulation( bModulateColors ? rDeviceColor[2] : 1.0 );
|
|
||||||
const double nAlphaModulation( bModulateColors && rDeviceColor.getLength() > 3 ?
|
|
||||||
rDeviceColor[3] : 1.0 );
|
|
||||||
|
|
||||||
Bitmap aSrcBitmap( rBitmap.GetBitmap() );
|
Bitmap aSrcBitmap( rBitmap.GetBitmap() );
|
||||||
Bitmap aSrcAlpha;
|
Bitmap aSrcAlpha;
|
||||||
@@ -336,6 +329,13 @@ namespace vclcanvas
|
|||||||
::basegfx::B2DHomMatrix aTransform( aLocalTransform );
|
::basegfx::B2DHomMatrix aTransform( aLocalTransform );
|
||||||
aTransform.invert();
|
aTransform.invert();
|
||||||
|
|
||||||
|
const bool bModulateColors( eModulationMode == MODULATE_WITH_DEVICECOLOR &&
|
||||||
|
rDeviceColor.getLength() > 2 );
|
||||||
|
const double nRedModulation( bModulateColors ? rDeviceColor[0] : 1.0 );
|
||||||
|
const double nGreenModulation( bModulateColors ? rDeviceColor[1] : 1.0 );
|
||||||
|
const double nBlueModulation( bModulateColors ? rDeviceColor[2] : 1.0 );
|
||||||
|
const double nAlphaModulation( bModulateColors && rDeviceColor.getLength() > 3 ?
|
||||||
|
rDeviceColor[3] : 1.0 );
|
||||||
// for the time being, always read as ARGB
|
// for the time being, always read as ARGB
|
||||||
for( int y=0; y<aDestBmpSize.Height(); ++y )
|
for( int y=0; y<aDestBmpSize.Height(); ++y )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user