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 *pOutDev, const Point &rDestPt, const Size &rDestSz, long nExtraData, OutputDevice *pFirstFrameOutDev)
 
void Stop (OutputDevice *pOutDev=nullptr, long nExtraData=0)
 
void Draw (OutputDevice *pOutDev, const Point &rDestPt) const
 
void Draw (OutputDevice *pOutDev, 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< AnimationBitmap > > & GetAnimationFrames ()
 
size_t Count () const
 
bool Insert (const AnimationBitmap &rAnimationBitmap)
 
const AnimationBitmapGet (sal_uInt16 nAnimation) const
 
void Replace (const AnimationBitmap &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< AnimationBitmap > > maList
 
std::vector< std::unique_ptr< ImplAnimView > > maViewList
 
Link< Animation *, voidmaNotifyLink
 
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

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

Detailed Description

Definition at line 31 of file Animation.hxx.

Constructor & Destructor Documentation

Animation::Animation ( )

Definition at line 35 of file Animation.cxx.

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

Animation::Animation ( const Animation rAnimation)

Definition at line 45 of file Animation.cxx.

References i, LINK, maList, maTimer, mbLoopTerminated, mnLoopCount, mnLoops, and Timer::SetInvokeHandler().

Animation::~Animation ( )

Definition at line 60 of file Animation.cxx.

References mbIsInAnimation, and Stop().

Member Function Documentation

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, maList, and SAL_WARN_IF.

void Animation::Clear ( )
void Animation::Convert ( BmpConversion  eConversion)

Definition at line 447 of file Animation.cxx.

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

size_t Animation::Count ( ) const
inline
Animation::DECL_DLLPRIVATE_LINK ( ImplTimeoutHdl  ,
Timer ,
void   
)
private
void Animation::Draw ( OutputDevice pOutDev,
const Point rDestPt 
) const

Definition at line 236 of file Animation.cxx.

References maGlobalSize, and OutputDevice::PixelToLogic().

Referenced by Start().

void Animation::Draw ( OutputDevice pOutDev,
const Point rDestPt,
const Size rDestSz 
) const
const AnimationBitmap & Animation::Get ( sal_uInt16  nAnimation) const

Definition at line 414 of file Animation.cxx.

References maList, and SAL_WARN_IF.

Referenced by ImplAnimView::draw(), GIFReader::ReadGIF(), and WriteAnimation().

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

Definition at line 68 of file Animation.hxx.

Referenced by BitmapFilter::Filter().

const BitmapEx& Animation::GetBitmapEx ( ) const
inline

Definition at line 58 of file Animation.hxx.

Referenced by BitmapFilter::Filter(), GetChecksum(), GetSizeBytes(), and WriteAnimation().

BitmapChecksum Animation::GetChecksum ( ) const
const Size& Animation::GetDisplaySizePixel ( ) const
inline

Definition at line 55 of file Animation.hxx.

Referenced by ImplAnimView::getPosSize(), and GraphicID::GraphicID().

sal_uInt32 Animation::GetLoopCount ( ) const
inline

Definition at line 61 of file Animation.hxx.

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

Definition at line 66 of file Animation.hxx.

sal_uLong Animation::GetSizeBytes ( ) const

Definition at line 125 of file Animation.cxx.

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

static SAL_DLLPRIVATE void Animation::ImplDecAnimCount ( )
inlinestatic

Definition at line 92 of file Animation.hxx.

Referenced by ImplAnimView::~ImplAnimView().

SAL_DLLPRIVATE sal_uLong Animation::ImplGetCurPos ( ) const
inline

Definition at line 93 of file Animation.hxx.

Referenced by ImplAnimView::ImplAnimView().

static SAL_DLLPRIVATE void Animation::ImplIncAnimCount ( )
inlinestatic

Definition at line 91 of file Animation.hxx.

Referenced by ImplAnimView::ImplAnimView().

void Animation::ImplRestartTimer ( sal_uLong  nTimeout)
private

Definition at line 273 of file Animation.cxx.

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

Referenced by IMPL_LINK_NOARG(), and Start().

bool Animation::Insert ( const AnimationBitmap rAnimationBitmap)
bool Animation::Invert ( )

Definition at line 490 of file Animation.cxx.

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

bool Animation::IsInAnimation ( ) const
inline

Definition at line 52 of file Animation.hxx.

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

bool Animation::IsTransparent ( ) const

Definition at line 106 of file Animation.cxx.

References Back, BitmapEx::IsTransparent(), maBitmapEx, maGlobalSize, and maList.

void Animation::Mirror ( BmpMirrorFlags  nMirrorFlags)
bool Animation::operator!= ( const Animation rAnimation) const
inline

Definition at line 40 of file Animation.hxx.

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

Definition at line 66 of file Animation.cxx.

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

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

Definition at line 85 of file Animation.cxx.

References maBitmapEx, maGlobalSize, and maList.

bool Animation::ReduceColors ( sal_uInt16  nNewColorCount)

Definition at line 464 of file Animation.cxx.

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

void Animation::Replace ( const AnimationBitmap rNewAnimationBmp,
sal_uInt16  nAnimation 
)
void Animation::ResetLoopCount ( )

Definition at line 441 of file Animation.cxx.

References mbLoopTerminated, mnLoopCount, and mnLoops.

Referenced by ReadAnimation(), and SetLoopCount().

void Animation::SetBitmapEx ( const BitmapEx rBmpEx)
inline

Definition at line 59 of file Animation.hxx.

Referenced by BitmapFilter::Filter().

void Animation::SetDisplaySizePixel ( const Size rSize)
inline

Definition at line 56 of file Animation.hxx.

Referenced by GIFReader::CreateNewBitmaps().

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

Definition at line 65 of file Animation.hxx.

bool Animation::Start ( OutputDevice pOutDev,
const Point rDestPt,
const Size rDestSz,
long  nExtraData,
OutputDevice pFirstFrameOutDev 
)
void Animation::Stop ( OutputDevice pOutDev = nullptr,
long  nExtraData = 0 
)

Definition at line 221 of file Animation.cxx.

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

Referenced by IMPL_LINK_NOARG(), and ~Animation().

Friends And Related Function Documentation

VCL_DLLPUBLIC SvStream& ReadAnimation ( SvStream rIStream,
Animation rAnimation 
)
friend

Definition at line 614 of file Animation.cxx.

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

Definition at line 569 of file Animation.cxx.

Member Data Documentation

BitmapEx Animation::maBitmapEx
private
Size Animation::maGlobalSize
private
std::vector<std::unique_ptr<AnimationBitmap> > Animation::maList
private
Link<Animation*, void> Animation::maNotifyLink
private

Definition at line 101 of file Animation.hxx.

Referenced by IMPL_LINK_NOARG().

Timer Animation::maTimer
private

Definition at line 103 of file Animation.hxx.

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

std::vector<std::unique_ptr<ImplAnimView> > Animation::maViewList
private

Definition at line 99 of file Animation.hxx.

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

bool Animation::mbIsInAnimation
private

Definition at line 108 of file Animation.hxx.

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

bool Animation::mbLoopTerminated
private

Definition at line 109 of file Animation.hxx.

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

sal_uLong Animation::mnAnimCount = 0
staticprivate

Definition at line 96 of file Animation.hxx.

sal_uInt32 Animation::mnLoopCount
private
sal_uInt32 Animation::mnLoops
private

Definition at line 106 of file Animation.hxx.

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

size_t Animation::mnPos
private

Definition at line 107 of file Animation.hxx.

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


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