diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-06-24 10:05:12 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-06-24 10:05:12 +0000 |
commit | d1ea8dc9000c10fb6fed72d246284b58be59a92f (patch) | |
tree | a613464b7c76711865399bfbbf5836ff0ecb5f56 /canvas/source/vcl/spritehelper.cxx | |
parent | 7bc7121c93393c27530953301b5f421db994ca18 (diff) |
INTEGRATION: CWS canvas05 (1.10.26); FILE MERGED
2008/04/21 07:28:40 thb 1.10.26.3: RESYNC: (1.10-1.11); FILE MERGED
2007/12/20 22:19:00 thb 1.10.26.2: #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
2007/10/01 13:02:04 thb 1.10.26.1: #i78888# #i78925# #i79258# #i79437# Merge from CWS picom
Diffstat (limited to 'canvas/source/vcl/spritehelper.cxx')
-rw-r--r-- | canvas/source/vcl/spritehelper.cxx | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx index 357a40188ada..123fe1002332 100644 --- a/canvas/source/vcl/spritehelper.cxx +++ b/canvas/source/vcl/spritehelper.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: spritehelper.cxx,v $ - * $Revision: 1.12 $ + * $Revision: 1.13 $ * * This file is part of OpenOffice.org. * @@ -32,6 +32,7 @@ #include "precompiled_canvas.hxx" #include <canvas/debug.hxx> +#include <tools/diagnose_ex.h> #include <canvas/verbosetrace.hxx> #include <rtl/math.hxx> @@ -65,34 +66,31 @@ namespace vclcanvas SpriteHelper::SpriteHelper() : mpBackBuffer(), mpBackBufferMask(), - mpSpriteCanvas(), maContent(), mbShowSpriteBounds(false) { } - void SpriteHelper::init( const geometry::RealSize2D& rSpriteSize, - const SpriteCanvasRef& rSpriteCanvas, - const BackBufferSharedPtr& rBackBuffer, - const BackBufferSharedPtr& rBackBufferMask, - bool bShowSpriteBounds ) + void SpriteHelper::init( const geometry::RealSize2D& rSpriteSize, + const ::canvas::SpriteSurface::Reference& rOwningSpriteCanvas, + const BackBufferSharedPtr& rBackBuffer, + const BackBufferSharedPtr& rBackBufferMask, + bool bShowSpriteBounds ) { - ENSURE_AND_THROW( rSpriteCanvas.get() && rBackBuffer && rBackBufferMask, - "SpriteHelper::init(): Invalid sprite canvas or back buffer" ); + ENSURE_OR_THROW( rOwningSpriteCanvas.get() && rBackBuffer && rBackBufferMask, + "SpriteHelper::init(): Invalid sprite canvas or back buffer" ); mpBackBuffer = rBackBuffer; mpBackBufferMask = rBackBufferMask; - mpSpriteCanvas = rSpriteCanvas; mbShowSpriteBounds = bShowSpriteBounds; - init( rSpriteSize, rSpriteCanvas.get() ); + init( rSpriteSize, rOwningSpriteCanvas ); } void SpriteHelper::disposing() { mpBackBuffer.reset(); mpBackBufferMask.reset(); - mpSpriteCanvas.clear(); // forward to parent CanvasCustomSpriteHelper::disposing(); @@ -105,8 +103,7 @@ namespace vclcanvas { (void)bBufferedUpdate; // not used on every platform - if( !mpSpriteCanvas.get() || - !mpBackBuffer || + if( !mpBackBuffer || !mpBackBufferMask ) { return; // we're disposed @@ -260,7 +257,7 @@ namespace vclcanvas if( getClip().is() ) { ::basegfx::B2DPolyPolygon aClipPoly( - ::canvas::tools::polyPolygonFromXPolyPolygon2D( + ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D( getClip() )); if( aClipPoly.count() ) @@ -443,7 +440,7 @@ namespace vclcanvas ::basegfx::B2DPolyPolygon SpriteHelper::polyPolygonFromXPolyPolygon2D( uno::Reference< rendering::XPolyPolygon2D >& xPoly ) const { - return ::canvas::tools::polyPolygonFromXPolyPolygon2D( xPoly ); + return ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D( xPoly ); } } |