summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/impimage.cxx
diff options
context:
space:
mode:
authorKai Ahrens <ka@openoffice.org>2002-04-22 07:51:50 +0000
committerKai Ahrens <ka@openoffice.org>2002-04-22 07:51:50 +0000
commit592cacd5c63dd0be0fc6546efc3b18e76eb5ecb2 (patch)
tree02394058b14cbdc2a4d8435b0f831c3e15ba2d72 /vcl/source/gdi/impimage.cxx
parent91f158b45e31ce6df8a7629c1dce772bc6e2471c (diff)
#98762#: added methods to create high contrast bitmaps
Diffstat (limited to 'vcl/source/gdi/impimage.cxx')
-rw-r--r--vcl/source/gdi/impimage.cxx34
1 files changed, 16 insertions, 18 deletions
diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx
index a46d1f03db1c..949b7e225f03 100644
--- a/vcl/source/gdi/impimage.cxx
+++ b/vcl/source/gdi/impimage.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: impimage.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: ka $ $Date: 2002-03-05 13:20:07 $
+ * last change: $Author: ka $ $Date: 2002-04-22 08:51:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -512,19 +512,7 @@ void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev,
aTmpMsk.Crop( aCropRect );
if( nStyle & IMAGE_DRAW_COLORTRANSFORM )
- {
- Color* pSrcColors = NULL;
- Color* pDstColors = NULL;
- ULONG nColorCount = 0;
-
- Image::GetColorTransformArrays( IMAGECOLORTRANSFORM_HIGHCONTRAST, pSrcColors, pDstColors, nColorCount );
-
- if( nColorCount && pSrcColors && pDstColors )
- aTmpBmp.Replace( pSrcColors, pDstColors, nColorCount );
-
- delete[] pSrcColors;
- delete[] pDstColors;
- }
+ aTmpBmp = aTmpBmp.GetColorTransformedBitmap( BMP_COLOR_HIGHCONTRAST );
if( nStyle & ( IMAGE_DRAW_HIGHLIGHT | IMAGE_DRAW_DEACTIVE ) )
{
@@ -619,10 +607,20 @@ void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev,
bFastTransparent = bTmp;
#endif
}
- else if( pSize )
- pOutDev->DrawBitmap( rPos, *pSize, aPos, aSize, aBmpEx.GetBitmap() );
else
- pOutDev->DrawBitmap( rPos, pOutDev->PixelToLogic( aSize ), aPos, aSize, aBmpEx.GetBitmap() );
+ {
+ BitmapEx aTmpBmpEx;
+
+ if( nStyle & IMAGE_DRAW_COLORTRANSFORM )
+ aTmpBmpEx = aBmpEx.GetColorTransformedBitmapEx( BMP_COLOR_HIGHCONTRAST );
+ else
+ aTmpBmpEx = aBmpEx;
+
+ if( pSize )
+ pOutDev->DrawBitmap( rPos, *pSize, aPos, aSize, aTmpBmpEx.GetBitmap() );
+ else
+ pOutDev->DrawBitmap( rPos, pOutDev->PixelToLogic( aSize ), aPos, aSize, aTmpBmpEx.GetBitmap() );
+ }
}
}