23#include <com/sun/star/rendering/InterpolationMode.hpp>
71 class Mutex=::osl::MutexGuard,
73 public IntegerBitmapBase< BitmapCanvasBase<Base, CanvasHelper, Mutex, UnambiguousBase> >
77 typedef ::rtl::Reference< SpriteCanvasBase >
Reference;
86 typename BaseType::MutexType aGuard( BaseType::m_aMutex );
91 BaseType::disposeThis();
95 virtual css::uno::Reference< css::rendering::XAnimatedSprite > SAL_CALL
createSpriteFromAnimation(
const css::uno::Reference< css::rendering::XAnimation >& animation )
override
99 static_cast< typename BaseType::UnambiguousBaseType*
>(
this));
101 typename BaseType::MutexType aGuard( BaseType::m_aMutex );
103 return BaseType::maCanvasHelper.createSpriteFromAnimation(animation);
106 virtual css::uno::Reference< css::rendering::XAnimatedSprite > SAL_CALL
createSpriteFromBitmaps(
const css::uno::Sequence< css::uno::Reference< css::rendering::XBitmap > >& animationBitmaps,
107 sal_Int8 interpolationMode )
override
111 static_cast< typename BaseType::UnambiguousBaseType*
>(
this));
113 css::rendering::InterpolationMode::NEAREST_NEIGHBOR,
114 css::rendering::InterpolationMode::BEZIERSPLINE4 );
116 typename BaseType::MutexType aGuard( BaseType::m_aMutex );
118 return BaseType::maCanvasHelper.createSpriteFromBitmaps(animationBitmaps, interpolationMode);
121 virtual css::uno::Reference< css::rendering::XCustomSprite > SAL_CALL
createCustomSprite(
const css::geometry::RealSize2D& spriteSize )
override
125 static_cast< typename BaseType::UnambiguousBaseType*
>(
this));
127 typename BaseType::MutexType aGuard( BaseType::m_aMutex );
129 return BaseType::maCanvasHelper.createCustomSprite(spriteSize);
132 virtual css::uno::Reference< css::rendering::XSprite > SAL_CALL
createClonedSprite(
const css::uno::Reference< css::rendering::XSprite >& original )
override
136 static_cast< typename BaseType::UnambiguousBaseType*
>(
this));
138 typename BaseType::MutexType aGuard( BaseType::m_aMutex );
140 return BaseType::maCanvasHelper.createClonedSprite(original);
146 OSL_ASSERT( rSprite.is() );
148 typename BaseType::MutexType aGuard( BaseType::m_aMutex );
155 OSL_ASSERT( rSprite.is() );
157 typename BaseType::MutexType aGuard( BaseType::m_aMutex );
163 const ::basegfx::B2DPoint& rOldPos,
164 const ::basegfx::B2DPoint& rNewPos,
165 const ::basegfx::B2DVector& rSpriteSize )
override
167 OSL_ASSERT( rSprite.is() );
169 typename BaseType::MutexType aGuard( BaseType::m_aMutex );
175 const ::basegfx::B2DPoint& rPos,
176 const ::basegfx::B2DRange& rUpdateArea )
override
178 OSL_ASSERT( rSprite.is() );
180 typename BaseType::MutexType aGuard( BaseType::m_aMutex );
Helper template to handle XIntegerBitmap method forwarding to BitmapCanvasHelper.
Helper template to handle XIntegerBitmap method forwarding to BitmapCanvasHelper.
virtual void moveSprite(const Sprite::Reference &rSprite, const ::basegfx::B2DPoint &rOldPos, const ::basegfx::B2DPoint &rNewPos, const ::basegfx::B2DVector &rSpriteSize) override
virtual css::uno::Reference< css::rendering::XAnimatedSprite > SAL_CALL createSpriteFromBitmaps(const css::uno::Sequence< css::uno::Reference< css::rendering::XBitmap > > &animationBitmaps, sal_Int8 interpolationMode) override
::rtl::Reference< SpriteCanvasBase > Reference
virtual css::uno::Reference< css::rendering::XSprite > SAL_CALL createClonedSprite(const css::uno::Reference< css::rendering::XSprite > &original) override
virtual void hideSprite(const Sprite::Reference &rSprite) override
virtual void updateSprite(const Sprite::Reference &rSprite, const ::basegfx::B2DPoint &rPos, const ::basegfx::B2DRange &rUpdateArea) override
virtual void disposeThis() override
IntegerBitmapBase< BitmapCanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase > > BaseType
virtual css::uno::Reference< css::rendering::XAnimatedSprite > SAL_CALL createSpriteFromAnimation(const css::uno::Reference< css::rendering::XAnimation > &animation) override
virtual css::uno::Reference< css::rendering::XCustomSprite > SAL_CALL createCustomSprite(const css::geometry::RealSize2D &spriteSize) override
virtual void showSprite(const Sprite::Reference &rSprite) override
SpriteRedrawManager maRedrawManager
This class manages smooth SpriteCanvas updates.
void moveSprite(const Sprite::Reference &rSprite, const ::basegfx::B2DPoint &rOldPos, const ::basegfx::B2DPoint &rNewPos, const ::basegfx::B2DVector &rSpriteSize)
void showSprite(const Sprite::Reference &rSprite)
void updateSprite(const Sprite::Reference &rSprite, const ::basegfx::B2DPoint &rPos, const ::basegfx::B2DRange &rUpdateArea)
void hideSprite(const Sprite::Reference &rSprite)
void disposing()
Must be called when user of this object gets disposed.