diff options
-rw-r--r-- | goodies/inc/grfmgr.hxx | 13 | ||||
-rw-r--r-- | goodies/source/graphic/grfmgr.cxx | 22 | ||||
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 10 |
3 files changed, 23 insertions, 22 deletions
diff --git a/goodies/inc/grfmgr.hxx b/goodies/inc/grfmgr.hxx index 6ca42bfc0d8d..d0b8eae86ee4 100644 --- a/goodies/inc/grfmgr.hxx +++ b/goodies/inc/grfmgr.hxx @@ -2,9 +2,9 @@ * * $RCSfile: grfmgr.hxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: ka $ $Date: 2001-11-07 15:51:52 $ + * last change: $Author: ka $ $Date: 2002-08-01 09:59:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,10 +70,11 @@ // - Defines - // ----------- -#define GRFMGR_DRAW_NOTCACHED 0x00000000UL -#define GRFMGR_DRAW_CACHED 0x00000001UL -#define GRFMGR_DRAW_BILINEAR 0x00000002UL -#define GRFMGR_DRAW_STANDARD (GRFMGR_DRAW_CACHED|GRFMGR_DRAW_BILINEAR) +#define GRFMGR_DRAW_NOTCACHED 0x00000000UL +#define GRFMGR_DRAW_CACHED 0x00000001UL +#define GRFMGR_DRAW_BILINEAR 0x00000002UL +#define GRFMGR_DRAW_USE_DRAWMODE_SETTINGS 0x00000004UL +#define GRFMGR_DRAW_STANDARD (GRFMGR_DRAW_CACHED|GRFMGR_DRAW_BILINEAR) // -------------------- // - AutoSwap Defines - diff --git a/goodies/source/graphic/grfmgr.cxx b/goodies/source/graphic/grfmgr.cxx index 511a5d7aa520..1ee23712176c 100644 --- a/goodies/source/graphic/grfmgr.cxx +++ b/goodies/source/graphic/grfmgr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: grfmgr.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: ka $ $Date: 2002-07-30 12:58:11 $ + * last change: $Author: ka $ $Date: 2002-08-01 10:00:27 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -663,12 +663,16 @@ List* GraphicObject::GetAnimationInfoList() const BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicAttr* pAttr, ULONG nFlags ) { - GraphicAttr aAttr( pAttr ? *pAttr : GetAttr() ); - Point aPt( rPt ); - Size aSz( rSz ); - BOOL bCropped = aAttr.IsCropped(); - BOOL bCached = FALSE; - BOOL bRet; + GraphicAttr aAttr( pAttr ? *pAttr : GetAttr() ); + Point aPt( rPt ); + Size aSz( rSz ); + const sal_uInt32 nOldDrawMode = pOut->GetDrawMode(); + BOOL bCropped = aAttr.IsCropped(); + BOOL bCached = FALSE; + BOOL bRet; + + if( !( GRFMGR_DRAW_USE_DRAWMODE_SETTINGS & nFlags ) ) + pOut->SetDrawMode( nOldDrawMode & ( ~( DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT ) ) ); // mirrored horizontically if( aSz.Width() < 0L ) @@ -716,6 +720,8 @@ BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, if( bCropped ) pOut->Pop(); + pOut->SetDrawMode( nOldDrawMode ); + return bRet; } diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index c16268e4d9aa..874d809088dd 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -2,9 +2,9 @@ * * $RCSfile: gdimtf.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: ka $ $Date: 2002-03-04 17:06:28 $ + * last change: $Author: ka $ $Date: 2002-08-01 09:58:51 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -466,10 +466,6 @@ void GDIMetaFile::Play( OutputDevice* pOut, ULONG nPos ) MetaAction* pAction = GetCurAction(); const ULONG nCount = Count(); ULONG i = 0, nSyncCount = ( pOut->GetOutDevType() == OUTDEV_WINDOW ) ? 0x000000ff : 0xffffffff; - const ULONG nOldDrawMode( pOut->GetDrawMode() ); - - pOut->SetDrawMode( nOldDrawMode & ~( DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | - DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT ) ); if( nPos > nCount ) nPos = nCount; @@ -487,8 +483,6 @@ void GDIMetaFile::Play( OutputDevice* pOut, ULONG nPos ) pAction = (MetaAction*) Next(); } - - pOut->SetDrawMode( nOldDrawMode ); } } |