LibreOffice Module vcl (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
Animation Class Reference

#include <Animation.hxx>

Collaboration diagram for Animation:
[legend]

Public Member Functions

 Animation ()
 
 Animation (const Animation &rAnimation)
 
 ~Animation ()
 
Animationoperator= (const Animation &rAnimation)
 
bool operator== (const Animation &rAnimation) const
 
bool operator!= (const Animation &rAnimation) const
 
void Clear ()
 
bool Start (OutputDevice &rOutDev, const Point &rDestPt, const Size &rDestSz, tools::Long nRendererId, OutputDevice *pFirstFrameOutDev)
 
void Stop (const OutputDevice *pOutDev=nullptr, tools::Long nRendererId=0)
 
void Draw (OutputDevice &rOutDev, const Point &rDestPt) const
 
void Draw (OutputDevice &rOutDev, const Point &rDestPt, const Size &rDestSz) const
 
bool IsInAnimation () const
 
bool IsTransparent () const
 
const SizeGetDisplaySizePixel () const
 
void SetDisplaySizePixel (const Size &rSize)
 
const BitmapExGetBitmapEx () const
 
void SetBitmapEx (const BitmapEx &rBmpEx)
 
sal_uInt32 GetLoopCount () const
 
void SetLoopCount (const sal_uInt32 nLoopCount)
 
void ResetLoopCount ()
 
void SetNotifyHdl (const Link< Animation *, void > &rLink)
 
const Link< Animation *, void > & GetNotifyHdl () const
 
std::vector< std::unique_ptr< AnimationFrame > > & GetAnimationFrames ()
 
size_t Count () const
 
bool Insert (const AnimationFrame &rAnimationFrame)
 
const AnimationFrameGet (sal_uInt16 nAnimation) const
 
void Replace (const AnimationFrame &rNewAnimationBmp, sal_uInt16 nAnimation)
 
sal_uLong GetSizeBytes () const
 
BitmapChecksum GetChecksum () const
 
void Convert (BmpConversion eConversion)
 
bool ReduceColors (sal_uInt16 nNewColorCount)
 
bool Invert ()
 
void Mirror (BmpMirrorFlags nMirrorFlags)
 
void Adjust (short nLuminancePercent, short nContrastPercent, short nChannelRPercent, short nChannelGPercent, short nChannelBPercent, double fGamma=1.0, bool bInvert=false)
 
SAL_DLLPRIVATE sal_uLong ImplGetCurPos () const
 

Static Public Member Functions

static SAL_DLLPRIVATE void ImplIncAnimCount ()
 
static SAL_DLLPRIVATE void ImplDecAnimCount ()
 

Private Member Functions

SAL_DLLPRIVATE void ImplRestartTimer (sal_uLong nTimeout)
 
 DECL_DLLPRIVATE_LINK (ImplTimeoutHdl, Timer *, void)
 

Private Attributes

std::vector< std::unique_ptr< AnimationFrame > > maFrames
 
std::vector< std::unique_ptr< AnimationRenderer > > maRenderers
 
Link< Animation *, void > maNotifyLink
 
BitmapEx maBitmapEx
 
Timer maTimer
 
Size maGlobalSize
 
sal_uInt32 mnLoopCount
 
sal_uInt32 mnLoops
 
size_t mnPos
 
bool mbIsInAnimation
 
bool mbLoopTerminated
 

Static Private Attributes

static SAL_DLLPRIVATE sal_uLong mnAnimCount = 0
 

Friends

SvStreamReadAnimation (SvStream &rIStream, Animation &rAnimation)
 
SvStreamWriteAnimation (SvStream &rOStream, const Animation &rAnimation)
 

Detailed Description

Definition at line 32 of file Animation.hxx.

Constructor & Destructor Documentation

◆ Animation() [1/2]

Animation::Animation ( )

Definition at line 36 of file Animation.cxx.

References LINK, maTimer, mnLoopCount, and Timer::SetInvokeHandler().

◆ Animation() [2/2]

Animation::Animation ( const Animation rAnimation)

◆ ~Animation()

Animation::~Animation ( )

Definition at line 63 of file Animation.cxx.

References mbIsInAnimation, and Stop().

Member Function Documentation

◆ Adjust()

void Animation::Adjust ( short  nLuminancePercent,
short  nContrastPercent,
short  nChannelRPercent,
short  nChannelGPercent,
short  nChannelBPercent,
double  fGamma = 1.0,
bool  bInvert = false 
)

Definition at line 546 of file Animation.cxx.

References BitmapEx::Adjust(), i, IsInAnimation(), maBitmapEx, maFrames, n, and SAL_WARN_IF.

◆ Clear()

void Animation::Clear ( )

◆ Convert()

void Animation::Convert ( BmpConversion  eConversion)

Definition at line 449 of file Animation.cxx.

References BitmapEx::Convert(), i, IsInAnimation(), maBitmapEx, maFrames, n, and SAL_WARN_IF.

◆ Count()

size_t Animation::Count ( ) const
inline

◆ DECL_DLLPRIVATE_LINK()

Animation::DECL_DLLPRIVATE_LINK ( ImplTimeoutHdl  ,
Timer ,
void   
)
private

◆ Draw() [1/2]

void Animation::Draw ( OutputDevice rOutDev,
const Point rDestPt 
) const

Definition at line 236 of file Animation.cxx.

References Draw(), maGlobalSize, and OutputDevice::PixelToLogic().

Referenced by Draw(), and Start().

◆ Draw() [2/2]

void Animation::Draw ( OutputDevice rOutDev,
const Point rDestPt,
const Size rDestSz 
) const

◆ Get()

const AnimationFrame & Animation::Get ( sal_uInt16  nAnimation) const

Definition at line 416 of file Animation.cxx.

References maFrames, and SAL_WARN_IF.

Referenced by AnimationRenderer::draw(), and GraphicObject::GetTransformedGraphic().

◆ GetAnimationFrames()

std::vector< std::unique_ptr< AnimationFrame > > & Animation::GetAnimationFrames ( )
inline

Definition at line 69 of file Animation.hxx.

Referenced by BitmapFilter::Filter().

◆ GetBitmapEx()

const BitmapEx & Animation::GetBitmapEx ( ) const
inline

◆ GetChecksum()

BitmapChecksum Animation::GetChecksum ( ) const

◆ GetDisplaySizePixel()

const Size & Animation::GetDisplaySizePixel ( ) const
inline

◆ GetLoopCount()

sal_uInt32 Animation::GetLoopCount ( ) const
inline

Definition at line 62 of file Animation.hxx.

References mnLoopCount.

◆ GetNotifyHdl()

const Link< Animation *, void > & Animation::GetNotifyHdl ( ) const
inline

Definition at line 67 of file Animation.hxx.

◆ GetSizeBytes()

sal_uLong Animation::GetSizeBytes ( ) const

Definition at line 128 of file Animation.cxx.

References GetBitmapEx(), BitmapEx::GetSizeBytes(), and maFrames.

◆ ImplDecAnimCount()

static SAL_DLLPRIVATE void Animation::ImplDecAnimCount ( )
inlinestatic

Definition at line 93 of file Animation.hxx.

Referenced by AnimationRenderer::~AnimationRenderer().

◆ ImplGetCurPos()

SAL_DLLPRIVATE sal_uLong Animation::ImplGetCurPos ( ) const
inline

Definition at line 94 of file Animation.hxx.

Referenced by AnimationRenderer::AnimationRenderer().

◆ ImplIncAnimCount()

static SAL_DLLPRIVATE void Animation::ImplIncAnimCount ( )
inlinestatic

Definition at line 92 of file Animation.hxx.

Referenced by AnimationRenderer::AnimationRenderer().

◆ ImplRestartTimer()

void Animation::ImplRestartTimer ( sal_uLong  nTimeout)
private

Definition at line 277 of file Animation.cxx.

References maTimer, Timer::SetTimeout(), and Timer::Start().

Referenced by Start().

◆ Insert()

bool Animation::Insert ( const AnimationFrame rAnimationFrame)

◆ Invert()

bool Animation::Invert ( )

Definition at line 492 of file Animation.cxx.

References i, BitmapEx::Invert(), IsInAnimation(), maBitmapEx, maFrames, n, and SAL_WARN_IF.

◆ IsInAnimation()

bool Animation::IsInAnimation ( ) const
inline

Definition at line 53 of file Animation.hxx.

Referenced by Adjust(), Convert(), BitmapFilter::Filter(), Insert(), Invert(), Mirror(), and ReduceColors().

◆ IsTransparent()

bool Animation::IsTransparent ( ) const

Definition at line 109 of file Animation.cxx.

References BitmapEx::IsAlpha(), maBitmapEx, maFrames, maGlobalSize, and Point.

◆ Mirror()

void Animation::Mirror ( BmpMirrorFlags  nMirrorFlags)

◆ operator!=()

bool Animation::operator!= ( const Animation rAnimation) const
inline

Definition at line 41 of file Animation.hxx.

◆ operator=()

Animation & Animation::operator= ( const Animation rAnimation)

Definition at line 69 of file Animation.cxx.

References Clear(), i, maBitmapEx, maFrames, maGlobalSize, mbLoopTerminated, mnLoopCount, mnLoops, and mnPos.

◆ operator==()

bool Animation::operator== ( const Animation rAnimation) const

Definition at line 88 of file Animation.cxx.

References maBitmapEx, maFrames, and maGlobalSize.

◆ ReduceColors()

bool Animation::ReduceColors ( sal_uInt16  nNewColorCount)

Definition at line 466 of file Animation.cxx.

References BitmapFilter::Filter(), i, IsInAnimation(), maBitmapEx, maFrames, n, and SAL_WARN_IF.

◆ Replace()

void Animation::Replace ( const AnimationFrame rNewAnimationBmp,
sal_uInt16  nAnimation 
)

◆ ResetLoopCount()

void Animation::ResetLoopCount ( )

Definition at line 443 of file Animation.cxx.

References mbLoopTerminated, mnLoopCount, and mnLoops.

Referenced by SetLoopCount().

◆ SetBitmapEx()

void Animation::SetBitmapEx ( const BitmapEx rBmpEx)
inline

Definition at line 60 of file Animation.hxx.

Referenced by BitmapFilter::Filter(), and TypeSerializer::readGraphic().

◆ SetDisplaySizePixel()

void Animation::SetDisplaySizePixel ( const Size rSize)
inline

Definition at line 57 of file Animation.hxx.

Referenced by GraphicObject::GetTransformedGraphic().

◆ SetLoopCount()

void Animation::SetLoopCount ( const sal_uInt32  nLoopCount)

Definition at line 437 of file Animation.cxx.

References mnLoopCount, and ResetLoopCount().

Referenced by GraphicObject::GetTransformedGraphic().

◆ SetNotifyHdl()

void Animation::SetNotifyHdl ( const Link< Animation *, void > &  rLink)
inline

Definition at line 66 of file Animation.hxx.

◆ Start()

bool Animation::Start ( OutputDevice rOutDev,
const Point rDestPt,
const Size rDestSz,
tools::Long  nRendererId,
OutputDevice pFirstFrameOutDev 
)

◆ Stop()

void Animation::Stop ( const OutputDevice pOutDev = nullptr,
tools::Long  nRendererId = 0 
)

Definition at line 220 of file Animation.cxx.

References maRenderers, maTimer, mbIsInAnimation, and Task::Stop().

Referenced by ~Animation().

Friends And Related Function Documentation

◆ ReadAnimation

SvStream & ReadAnimation ( SvStream rIStream,
Animation rAnimation 
)
friend

Definition at line 614 of file Animation.cxx.

◆ WriteAnimation

SvStream & WriteAnimation ( SvStream rOStream,
const Animation rAnimation 
)
friend

Definition at line 568 of file Animation.cxx.

Member Data Documentation

◆ maBitmapEx

BitmapEx Animation::maBitmapEx
private

◆ maFrames

std::vector<std::unique_ptr<AnimationFrame> > Animation::maFrames
private

◆ maGlobalSize

Size Animation::maGlobalSize
private

Definition at line 105 of file Animation.hxx.

Referenced by Clear(), Draw(), GetChecksum(), Insert(), IsTransparent(), Mirror(), operator=(), and operator==().

◆ maNotifyLink

Link<Animation*, void> Animation::maNotifyLink
private

Definition at line 102 of file Animation.hxx.

◆ maRenderers

std::vector<std::unique_ptr<AnimationRenderer> > Animation::maRenderers
private

Definition at line 100 of file Animation.hxx.

Referenced by Clear(), Start(), and Stop().

◆ maTimer

Timer Animation::maTimer
private

Definition at line 104 of file Animation.hxx.

Referenced by Animation(), Clear(), ImplRestartTimer(), Start(), and Stop().

◆ mbIsInAnimation

bool Animation::mbIsInAnimation
private

Definition at line 109 of file Animation.hxx.

Referenced by Clear(), Start(), Stop(), and ~Animation().

◆ mbLoopTerminated

bool Animation::mbLoopTerminated
private

Definition at line 110 of file Animation.hxx.

Referenced by Animation(), Draw(), operator=(), Replace(), ResetLoopCount(), and Start().

◆ mnAnimCount

sal_uLong Animation::mnAnimCount = 0
staticprivate

Definition at line 97 of file Animation.hxx.

◆ mnLoopCount

sal_uInt32 Animation::mnLoopCount
private

Definition at line 106 of file Animation.hxx.

Referenced by Animation(), operator=(), ResetLoopCount(), and SetLoopCount().

◆ mnLoops

sal_uInt32 Animation::mnLoops
private

Definition at line 107 of file Animation.hxx.

Referenced by Animation(), operator=(), and ResetLoopCount().

◆ mnPos

size_t Animation::mnPos
private

Definition at line 108 of file Animation.hxx.

Referenced by Draw(), operator=(), and Start().


The documentation for this class was generated from the following files: