1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: null_spritecanvashelper.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_canvas.hxx"
34 #include <canvas/debug.hxx>
35 #include <canvas/verbosetrace.hxx>
36 #include <canvas/canvastools.hxx>
38 #include <comphelper/scopeguard.hxx>
40 #include <basegfx/range/b2drectangle.hxx>
41 #include <basegfx/tools/canvastools.hxx>
43 #include <boost/cast.hpp>
45 #include "null_spritecanvashelper.hxx"
46 #include "null_canvascustomsprite.hxx"
49 using namespace ::com::sun::star
;
53 SpriteCanvasHelper::SpriteCanvasHelper() :
54 mpRedrawManager( NULL
)
58 void SpriteCanvasHelper::init( ::canvas::SpriteRedrawManager
& rManager
,
59 SpriteCanvas
& rDevice
,
60 const ::basegfx::B2ISize
& rSize
,
63 mpRedrawManager
= &rManager
;
65 CanvasHelper::init( rSize
, rDevice
, bHasAlpha
);
68 void SpriteCanvasHelper::disposing()
70 mpRedrawManager
= NULL
;
73 CanvasHelper::disposing();
76 uno::Reference
< rendering::XAnimatedSprite
> SpriteCanvasHelper::createSpriteFromAnimation(
77 const uno::Reference
< rendering::XAnimation
>& /*animation*/ )
79 return uno::Reference
< rendering::XAnimatedSprite
>();
82 uno::Reference
< rendering::XAnimatedSprite
> SpriteCanvasHelper::createSpriteFromBitmaps(
83 const uno::Sequence
< uno::Reference
< rendering::XBitmap
> >& /*animationBitmaps*/,
84 sal_Int8
/*interpolationMode*/ )
86 return uno::Reference
< rendering::XAnimatedSprite
>();
89 uno::Reference
< rendering::XCustomSprite
> SpriteCanvasHelper::createCustomSprite( const geometry::RealSize2D
& spriteSize
)
91 if( !mpRedrawManager
)
92 return uno::Reference
< rendering::XCustomSprite
>(); // we're disposed
94 return uno::Reference
< rendering::XCustomSprite
>(
95 new CanvasCustomSprite( spriteSize
,
99 uno::Reference
< rendering::XSprite
> SpriteCanvasHelper::createClonedSprite( const uno::Reference
< rendering::XSprite
>& /*original*/ )
101 return uno::Reference
< rendering::XSprite
>();
104 sal_Bool
SpriteCanvasHelper::updateScreen( const ::basegfx::B2IRange
& /*rCurrArea*/,
105 sal_Bool
/*bUpdateAll*/,
106 bool& /*io_bSurfaceDirty*/ )
112 void SpriteCanvasHelper::backgroundPaint( const ::basegfx::B2DRange
& /*rUpdateRect*/ )
117 void SpriteCanvasHelper::scrollUpdate( const ::basegfx::B2DRange
& /*rMoveStart*/,
118 const ::basegfx::B2DRange
& /*rMoveEnd*/,
119 const ::canvas::SpriteRedrawManager::UpdateArea
& /*rUpdateArea*/ )
124 void SpriteCanvasHelper::opaqueUpdate( const ::canvas::SpriteRedrawManager::UpdateArea
& /*rUpdateArea*/ )
129 void SpriteCanvasHelper::genericUpdate( const ::canvas::SpriteRedrawManager::UpdateArea
& /*rUpdateArea*/ )