diff options
Diffstat (limited to 'vcl/source/gdi/outdev6.cxx')
-rw-r--r-- | vcl/source/gdi/outdev6.cxx | 45 |
1 files changed, 36 insertions, 9 deletions
diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx index eb4b76fb4b41..4e02681841d2 100644 --- a/vcl/source/gdi/outdev6.cxx +++ b/vcl/source/gdi/outdev6.cxx @@ -28,12 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#ifndef _SV_SVSYS_HXX -#include <svsys.h> -#endif -#include <vcl/salgdi.hxx> #include <tools/debug.hxx> -#include <vcl/outdev.h> #include <vcl/outdev.hxx> #include <vcl/virdev.hxx> #include <vcl/bmpacc.hxx> @@ -42,16 +37,22 @@ #include <vcl/svapp.hxx> #include <vcl/wrkwin.hxx> #include <vcl/graph.hxx> -#include <vcl/wall2.hxx> +#include <vcl/rendergraphicrasterizer.hxx> + +#include <wall2.hxx> +#include <salgdi.hxx> +#include <window.h> +#include <svdata.hxx> +#include <outdev.h> + #include <com/sun/star/uno/Sequence.hxx> #include <basegfx/vector/b2dvector.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> + #include <math.h> -#include <vcl/window.h> -#include <vcl/svdata.hxx> // ======================================================================== @@ -1143,6 +1144,7 @@ void OutputDevice::Erase() return; sal_Bool bNativeOK = sal_False; + if( meOutDevType == OUTDEV_WINDOW ) { Window* pWindow = static_cast<Window*>(this); @@ -1193,6 +1195,8 @@ void OutputDevice::ImplDraw2ColorFrame( const Rectangle& rRect, bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize, const GfxLink& rGfxLink, GDIMetaFile* pSubst ) { + DBG_TRACE( "OutputDevice::DrawEPS()" ); + bool bDrawn(true); if ( mpMetaFile ) @@ -1211,7 +1215,7 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize, if( mbOutputClipped ) return bDrawn; - Rectangle aRect( ImplLogicToDevicePixel( Rectangle( rPoint, rSize ) ) ); + Rectangle aRect( ImplLogicToDevicePixel( Rectangle( rPoint, rSize ) ) ); if( !aRect.IsEmpty() ) { @@ -1245,3 +1249,26 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize, return bDrawn; } + +// ------------------------------------------------------------------ + +void OutputDevice::DrawRenderGraphic( const Point& rPoint, const Size& rSize, + const ::vcl::RenderGraphic& rRenderGraphic ) +{ + DBG_TRACE( "OutputDevice::DrawRenderGraphic()" ); + + if( mpMetaFile ) + mpMetaFile->AddAction( new MetaRenderGraphicAction( rPoint, rSize, rRenderGraphic ) ); + + if( !rRenderGraphic.IsEmpty() ) + { + ::vcl::RenderGraphicRasterizer aRasterizer( rRenderGraphic ); + BitmapEx aBmpEx; + const Size aSizePixel( LogicToPixel( rSize ) ); + GDIMetaFile* pOldMetaFile = mpMetaFile; + + mpMetaFile = NULL; + DrawBitmapEx( rPoint, rSize, aRasterizer.Rasterize( aSizePixel ) ); + mpMetaFile = pOldMetaFile; + } +} |