From 2eadc98640915cfc179cd725cb118d67bd4e6bd4 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Tue, 19 Aug 2008 23:33:20 +0000 Subject: [PATCH] INTEGRATION: CWS aw033 (1.18.18); FILE MERGED 2008/08/19 16:00:12 cl 1.18.18.8: RESYNC: (1.28-1.29); FILE MERGED 2008/06/26 12:22:31 aw 1.18.18.7: corrections after resync 2008/05/14 15:09:21 aw 1.18.18.6: RESYNC: (1.27-1.28); FILE MERGED 2008/02/12 11:36:22 aw 1.18.18.5: RESYNC: (1.26-1.27); FILE MERGED 2007/12/13 16:44:09 aw 1.18.18.4: #i39532# AA work for unxlngi6 2007/08/09 20:01:45 aw 1.18.18.3: RESYNC: (1.19-1.26); FILE MERGED 2007/06/27 18:44:48 aw 1.18.18.2: RESYNC: (1.18-1.19); FILE MERGED 2007/01/19 17:11:57 aw 1.18.18.1: changes after resync, problems with math includes --- vcl/source/gdi/outdev6.cxx | 65 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 2 deletions(-) diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx index 7fedc6bb22aa..453c769c9c04 100644 --- a/vcl/source/gdi/outdev6.cxx +++ b/vcl/source/gdi/outdev6.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: outdev6.cxx,v $ - * $Revision: 1.31 $ + * $Revision: 1.32 $ * * This file is part of OpenOffice.org. * @@ -49,9 +49,10 @@ #include #include +#include #include #include - +#include #include #include @@ -155,6 +156,66 @@ void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, ULONG nF mpAlphaVDev->DrawGrid( rRect, rDist, nFlags ); } +// ------------------------------------------------------------------------ +// Caution: This method is nearly the same as +// void OutputDevice::DrawPolyPolygon( const basegfx::B2DPolyPolygon& rB2DPolyPoly ) +// so when changes are made here do not forget to make change sthere, too + +void OutputDevice::DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly, double fTransparency) +{ + DBG_TRACE( "OutputDevice::DrawTransparent(B2D&,transparency)" ); + DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); + + // AW: Do NOT paint empty PolyPolygons + if(!rB2DPolyPoly.count()) + return; + + // we need a graphics + if( !mpGraphics ) + if( !ImplGetGraphics() ) + return; + + if( mbInitClipRegion ) + ImplInitClipRegion(); + if( mbOutputClipped ) + return; + + if( mbInitLineColor ) + ImplInitLineColor(); + if( mbInitFillColor ) + ImplInitFillColor(); + + if(mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW) + { +#ifdef UNX + // b2dpolygon support not implemented yet on non-UNX platforms + const ::basegfx::B2DHomMatrix aTransform = GetViewTransformation(); + ::basegfx::B2DPolyPolygon aB2DPP = rB2DPolyPoly; + aB2DPP.transform( aTransform ); + + if( mpGraphics->DrawPolyPolygon( aB2DPP, fTransparency, this ) ) + { +#if 0 + // MetaB2DPolyPolygonAction is not implemented yet: + // according to AW adding it is very dangerous since there is a lot + // of code that uses the metafile actions directly and unless every + // place that does this knows about the new action we need to fallback + if( mpMetaFile ) + mpMetaFile->AddAction( new MetaB2DPolyPolygonAction( rB2DPolyPoly ) ); +#else + if( mpMetaFile ) + mpMetaFile->AddAction( new MetaTransparentAction( PolyPolygon( rB2DPolyPoly ), static_cast< sal_uInt16 >(fTransparency * 100.0))); +#endif + return; + } +#endif + } + + // fallback to old polygon drawing if needed + const PolyPolygon aToolsPolyPolygon( rB2DPolyPoly ); + DrawTransparent(PolyPolygon(rB2DPolyPoly), static_cast< sal_uInt16 >(fTransparency * 100.0)); +} + // ------------------------------------------------------------------------ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,