From 44084ecab5a2692c6b76ca365050437b6ce4c36b Mon Sep 17 00:00:00 2001 From: Kai Ahrens Date: Thu, 1 Aug 2002 09:00:27 +0000 Subject: #101737#: don't set reset drawmode for metafile playing --- goodies/source/graphic/grfmgr.cxx | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'goodies/source') 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; } -- cgit