summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/impimage.cxx
diff options
context:
space:
mode:
authorKai Ahrens <ka@openoffice.org>2002-03-01 14:10:58 +0000
committerKai Ahrens <ka@openoffice.org>2002-03-01 14:10:58 +0000
commit81a41b0d8aeca53ddf1e00b9374e83aa49658e82 (patch)
tree8f4ad4f673eb960c829ec9838973a61fb2af4042 /vcl/source/gdi/impimage.cxx
parentb2bd677fca3348ab041c7cfba6f1be731f1d5477 (diff)
#97856#: added high contrast support
Diffstat (limited to 'vcl/source/gdi/impimage.cxx')
-rw-r--r--vcl/source/gdi/impimage.cxx30
1 files changed, 4 insertions, 26 deletions
diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx
index bd19653e98c2..4e39ef2225b8 100644
--- a/vcl/source/gdi/impimage.cxx
+++ b/vcl/source/gdi/impimage.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: impimage.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: ka $ $Date: 2002-03-01 12:35:42 $
+ * last change: $Author: ka $ $Date: 2002-03-01 15:10:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -498,7 +498,7 @@ void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev,
{
BOOL bDrawn = FALSE;
- if( nStyle & ( IMAGE_DRAW_HIGHCONTRAST | IMAGE_DRAW_HIGHLIGHT | IMAGE_DRAW_DEACTIVE ) )
+ if( nStyle & ( IMAGE_DRAW_COLORTRANSFORM | IMAGE_DRAW_HIGHLIGHT | IMAGE_DRAW_DEACTIVE ) )
{
Bitmap aTmpBmp( aBmp ), aTmpMsk( aMask );
const Rectangle aCropRect( Rectangle( IPOS( nPos ), aSize ) );
@@ -506,7 +506,7 @@ void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev,
aTmpBmp.Crop( aCropRect );
aTmpMsk.Crop( aCropRect );
- if( nStyle & IMAGE_DRAW_HIGHCONTRAST )
+ if( nStyle & IMAGE_DRAW_COLORTRANSFORM )
{
Color* pSrcColors = NULL;
Color* pDstColors = NULL;
@@ -603,28 +603,6 @@ void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev,
pOutDev->DrawBitmapEx( aOutPos, BitmapEx( aTmpBmp, aTmpMsk ) );
bDrawn = TRUE;
}
- else if( nStyle & IMAGE_DRAW_HIGHCONTRAST )
- {
- Bitmap aTmpBmp( aBmp ), aTmpMsk( aMask );
- const Rectangle aCropRect( Rectangle( IPOS( nPos ), aSize ) );
- Color* pSrcColors = NULL;
- Color* pDstColors = NULL;
- ULONG nColorCount = 0;
-
- aTmpBmp.Crop( aCropRect );
- aTmpMsk.Crop( aCropRect );
-
- Image::GetColorTransformArrays( IMAGECOLORTRANSFORM_HIGHCONTRAST, pSrcColors, pDstColors, nColorCount );
-
- if( nColorCount && pSrcColors && pDstColors )
- aTmpBmp.Replace( pSrcColors, pDstColors, nColorCount );
-
- pOutDev->DrawBitmapEx( aOutPos, BitmapEx( aTmpBmp, aTmpMsk ) );
-
- delete[] pSrcColors;
- delete[] pDstColors;
- bDrawn = TRUE;
- }
if( !bDrawn )
pOutDev->DrawBitmapEx( aOutPos, aOutSize, IPOS( nPos), aSize, aBmpEx );