diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-06-24 09:32:11 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-06-24 09:32:11 +0000 |
commit | d4a6ad9763f5eacfbf88f076656f571af19d71c5 (patch) | |
tree | 288a43f6df9caded822244f6e0db10c8882ff73d | |
parent | c37ef2c49caf8724b46c8495ed8d5c1dd84b35a1 (diff) |
INTEGRATION: CWS canvas05 (1.2.2); FILE MERGED
2008/04/21 07:30:11 thb 1.2.2.3: RESYNC: (1.2-1.3); FILE MERGED
2008/01/22 00:25:23 thb 1.2.2.2: #i81092# Making gdiplus and dx canvas more independent
2007/12/20 22:18:57 thb 1.2.2.1: #i81092# #i78888# #i78925# #i79258# #i79437# #i84784# Large canvas rework, completing various areas such as color spaces, bitmap data access, true sprite and non-sprite implementations, and upstreaming the canvas parts of rodos emf+ rendering
-rwxr-xr-x | canvas/source/directx/dx_canvascustomsprite.cxx | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/canvas/source/directx/dx_canvascustomsprite.cxx b/canvas/source/directx/dx_canvascustomsprite.cxx index 354c19f32759..a63f7cb74011 100755 --- a/canvas/source/directx/dx_canvascustomsprite.cxx +++ b/canvas/source/directx/dx_canvascustomsprite.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: dx_canvascustomsprite.cxx,v $ - * $Revision: 1.3 $ + * $Revision: 1.4 $ * * This file is part of OpenOffice.org. * @@ -28,9 +28,13 @@ * ************************************************************************/ +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_canvas.hxx" + #include <ctype.h> // don't ask. msdev breaks otherwise... #include <canvas/debug.hxx> #include <canvas/verbosetrace.hxx> +#include <tools/diagnose_ex.h> #include <rtl/logfile.hxx> #include <rtl/math.hxx> @@ -53,13 +57,14 @@ namespace dxcanvas const IDXRenderModuleSharedPtr& rRenderModule, const ::canvas::ISurfaceProxyManagerSharedPtr& rSurfaceProxy, bool bShowSpriteBounds ) : - mpSpriteCanvas( rRefDevice ) + mpSpriteCanvas( rRefDevice ), + mpSurface() { - ENSURE_AND_THROW( rRefDevice.get(), - "CanvasCustomSprite::CanvasCustomSprite(): Invalid sprite canvas" ); + ENSURE_OR_THROW( rRefDevice.get(), + "CanvasCustomSprite::CanvasCustomSprite(): Invalid sprite canvas" ); - DXBitmapSharedPtr pBitmap( - new DXBitmap( + mpSurface.reset( + new DXSurfaceBitmap( ::basegfx::B2IVector( ::canvas::tools::roundUp( rSpriteSize.Width ), ::canvas::tools::roundUp( rSpriteSize.Height )), @@ -68,12 +73,12 @@ namespace dxcanvas true)); maCanvasHelper.setDevice( *rRefDevice.get() ); - maCanvasHelper.setTarget( pBitmap ); + maCanvasHelper.setTarget( mpSurface ); maSpriteHelper.init( rSpriteSize, rRefDevice, rRenderModule, - maCanvasHelper.getTarget(), + mpSurface, bShowSpriteBounds ); // clear sprite to 100% transparent @@ -84,6 +89,7 @@ namespace dxcanvas { ::osl::MutexGuard aGuard( m_aMutex ); + mpSurface.reset(); mpSpriteCanvas.clear(); // forward to parent |