summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/inc/image.h4
-rw-r--r--vcl/source/gdi/impimage.cxx19
-rw-r--r--vcl/source/outdev/bitmap.cxx4
3 files changed, 14 insertions, 13 deletions
diff --git a/vcl/inc/image.h b/vcl/inc/image.h
index 3aa942418bb6..bc1426299436 100644
--- a/vcl/inc/image.h
+++ b/vcl/inc/image.h
@@ -35,7 +35,7 @@ public:
void Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHeight,sal_uInt16 nInitSize );
void ColorTransform();
- void Draw( sal_uInt16 nPos, OutputDevice* pDev, const Point& rPos, DrawImageFlags nStyle, const Size* pSize = NULL );
+ void Draw( OutputDevice* pDev, const Point& rPos, DrawImageFlags nStyle, const Size* pSize = NULL );
private:
@@ -47,7 +47,7 @@ private:
sal_uInt16 mnSize;
void ImplUpdateDisplayBmp( OutputDevice* pOutDev );
- void ImplUpdateDisabledBmpEx( int nPos );
+ void ImplUpdateDisabledBmpEx();
private:
ImplImageBmp( const ImplImageBmp& ) SAL_DELETED_FUNCTION;
diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx
index 87b9bce71075..ef4410dba3b1 100644
--- a/vcl/source/gdi/impimage.cxx
+++ b/vcl/source/gdi/impimage.cxx
@@ -169,20 +169,20 @@ void ImplImageBmp::Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHe
mnSize );
}
-void ImplImageBmp::Draw( sal_uInt16 nPos, OutputDevice* pOutDev,
+void ImplImageBmp::Draw( OutputDevice* pOutDev,
const Point& rPos, DrawImageFlags nStyle,
const Size* pSize )
{
if( pOutDev->IsDeviceOutputNecessary() )
{
- const Point aSrcPos( nPos * maSize.Width(), 0 );
+ const Point aSrcPos(0, 0);
Size aOutSize;
aOutSize = ( pSize ? *pSize : pOutDev->PixelToLogic( maSize ) );
if( nStyle & DrawImageFlags::Disable )
{
- ImplUpdateDisabledBmpEx( nPos);
+ ImplUpdateDisabledBmpEx();
pOutDev->DrawBitmapEx( rPos, aOutSize, aSrcPos, maSize, maDisabledBmpEx );
}
else
@@ -193,7 +193,7 @@ void ImplImageBmp::Draw( sal_uInt16 nPos, OutputDevice* pOutDev,
BitmapEx aTmpBmpEx;
const Rectangle aCropRect( aSrcPos, maSize );
- if( mpInfoAry[ nPos ] & ( IMPSYSIMAGEITEM_MASK | IMPSYSIMAGEITEM_ALPHA ) )
+ if( mpInfoAry[0] & ( IMPSYSIMAGEITEM_MASK | IMPSYSIMAGEITEM_ALPHA ) )
aTmpBmpEx = maBmpEx;
else
aTmpBmpEx = maBmpEx.GetBitmap();
@@ -347,7 +347,7 @@ pOutDev
}
}
-void ImplImageBmp::ImplUpdateDisabledBmpEx( int nPos )
+void ImplImageBmp::ImplUpdateDisabledBmpEx()
{
const Size aTotalSize( maBmpEx.GetSizePixel() );
@@ -357,7 +357,6 @@ void ImplImageBmp::ImplUpdateDisabledBmpEx( int nPos )
AlphaMask aGreyAlphaMask( aTotalSize );
maDisabledBmpEx = BitmapEx( aGrey, aGreyAlphaMask );
- nPos = -1;
}
Bitmap aBmp( maBmpEx.GetBitmap() );
@@ -373,9 +372,11 @@ void ImplImageBmp::ImplUpdateDisabledBmpEx( int nPos )
{
BitmapColor aGreyVal( 0 );
BitmapColor aGreyAlphaMaskVal( 0 );
- const Point aPos( ( nPos < 0 ) ? 0 : ( nPos * maSize.Width() ), 0 );
- const int nLeft = aPos.X(), nRight = nLeft + ( ( nPos < 0 ) ? aTotalSize.Width() : maSize.Width() );
- const int nTop = aPos.Y(), nBottom = nTop + maSize.Height();
+
+ const int nLeft = 0;
+ const int nRight = nLeft + maSize.Width();
+ const int nTop = 0;
+ const int nBottom = nTop + maSize.Height();
for( int nY = nTop; nY < nBottom; ++nY )
{
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index bb72a3797d47..aebc7df28ea7 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -1381,9 +1381,9 @@ void OutputDevice::DrawImage( const Point& rPos, const Size& rSize,
}
if ( bIsSizeValid )
- pData->mpImageBitmap->Draw( 0, this, rPos, nStyle, &rSize );
+ pData->mpImageBitmap->Draw( this, rPos, nStyle, &rSize );
else
- pData->mpImageBitmap->Draw( 0, this, rPos, nStyle );
+ pData->mpImageBitmap->Draw( this, rPos, nStyle );
}
break;