LibreOffice Module vcl (master)
1
|
#include <Animation.hxx>
Public Member Functions | |
Animation () | |
Animation (const Animation &rAnimation) | |
~Animation () | |
Animation & | operator= (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 nExtraData, OutputDevice *pFirstFrameOutDev) |
void | Stop (const OutputDevice *pOutDev=nullptr, tools::Long nExtraData=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 Size & | GetDisplaySizePixel () const |
void | SetDisplaySizePixel (const Size &rSize) |
const BitmapEx & | GetBitmapEx () 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 AnimationBitmap & | Get (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 *, 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 | |
SvStream & | ReadAnimation (SvStream &rIStream, Animation &rAnimation) |
SvStream & | WriteAnimation (SvStream &rOStream, const Animation &rAnimation) |
Definition at line 32 of file Animation.hxx.
Animation::Animation | ( | ) |
Definition at line 36 of file Animation.cxx.
References false, LINK, maTimer, mnLoopCount, and Timer::SetInvokeHandler().
Animation::Animation | ( | const Animation & | rAnimation | ) |
Definition at line 47 of file Animation.cxx.
References false, i, LINK, maList, maTimer, mbLoopTerminated, mnLoopCount, mnLoopCount, mnLoops, and Timer::SetInvokeHandler().
Animation::~Animation | ( | ) |
Definition at line 63 of file Animation.cxx.
References mbIsInAnimation, and Stop().
void Animation::Adjust | ( | short | nLuminancePercent, |
short | nContrastPercent, | ||
short | nChannelRPercent, | ||
short | nChannelGPercent, | ||
short | nChannelBPercent, | ||
double | fGamma = 1.0 , |
||
bool | bInvert = false |
||
) |
Definition at line 531 of file Animation.cxx.
References BitmapEx::Adjust(), i, IsInAnimation(), maBitmapEx, maList, n, and SAL_WARN_IF.
void Animation::Clear | ( | ) |
Definition at line 99 of file Animation.cxx.
References maBitmapEx, maGlobalSize, maList, maTimer, maViewList, mbIsInAnimation, BitmapEx::SetEmpty(), and Task::Stop().
Referenced by operator=(), and ReadAnimation().
void Animation::Convert | ( | BmpConversion | eConversion | ) |
Definition at line 434 of file Animation.cxx.
References BitmapEx::Convert(), i, IsInAnimation(), maBitmapEx, maList, n, and SAL_WARN_IF.
|
inline |
Definition at line 70 of file Animation.hxx.
Referenced by ImplAnimView::draw(), ImplAnimView::drawToPos(), BitmapFilter::Filter(), and WriteAnimation().
void Animation::Draw | ( | OutputDevice & | rOutDev, |
const Point & | rDestPt | ||
) | const |
Definition at line 235 of file Animation.cxx.
References maGlobalSize, and OutputDevice::PixelToLogic().
Referenced by Start().
void Animation::Draw | ( | OutputDevice & | rOutDev, |
const Point & | rDestPt, | ||
const Size & | rDestSz | ||
) | const |
Definition at line 240 of file Animation.cxx.
References ANIMATION_TIMEOUT_ON_CLICK, BitmapEx::Draw(), OutputDevice::GetConnectMetaFile(), OutputDevice::GetOutDevType(), AnimationBitmap::maBitmapEx, maList, mbLoopTerminated, mnPos, AnimationBitmap::mnWait, nCount, and OUTDEV_PRINTER.
const AnimationBitmap & Animation::Get | ( | sal_uInt16 | nAnimation | ) | const |
Definition at line 401 of file Animation.cxx.
References maList, and SAL_WARN_IF.
Referenced by ImplAnimView::draw(), and WriteAnimation().
|
inline |
Definition at line 69 of file Animation.hxx.
Referenced by BitmapFilter::Filter().
|
inline |
Definition at line 59 of file Animation.hxx.
Referenced by BitmapFilter::Filter(), GetChecksum(), GetSizeBytes(), and WriteAnimation().
BitmapChecksum Animation::GetChecksum | ( | ) | const |
Definition at line 140 of file Animation.cxx.
References BCToBCOA(), BITMAP_CHECKSUM_SIZE, GetBitmapEx(), BitmapEx::GetChecksum(), Size::Height(), i, maGlobalSize, maList, vcl_get_checksum(), and Size::Width().
|
inline |
Definition at line 56 of file Animation.hxx.
Referenced by ImplAnimView::getPosSize().
|
inline |
Definition at line 62 of file Animation.hxx.
References mnLoopCount.
Definition at line 67 of file Animation.hxx.
sal_uLong Animation::GetSizeBytes | ( | ) | const |
Definition at line 128 of file Animation.cxx.
References GetBitmapEx(), BitmapEx::GetSizeBytes(), and maList.
|
inlinestatic |
Definition at line 93 of file Animation.hxx.
Referenced by ImplAnimView::~ImplAnimView().
|
inline |
Definition at line 94 of file Animation.hxx.
Referenced by ImplAnimView::ImplAnimView().
|
inlinestatic |
Definition at line 92 of file Animation.hxx.
Referenced by ImplAnimView::ImplAnimView().
Definition at line 272 of file Animation.cxx.
References maTimer, Timer::SetTimeout(), and Timer::Start().
Referenced by IMPL_LINK_NOARG(), and Start().
bool Animation::Insert | ( | const AnimationBitmap & | rAnimationBitmap | ) |
Definition at line 378 of file Animation.cxx.
References tools::Rectangle::GetSize(), IsInAnimation(), AnimationBitmap::maBitmapEx, maBitmapEx, maGlobalSize, maList, AnimationBitmap::maPositionPixel, AnimationBitmap::maSizePixel, Point, and tools::Rectangle::Union().
Referenced by ReadAnimation().
bool Animation::Invert | ( | ) |
Definition at line 477 of file Animation.cxx.
References i, BitmapEx::Invert(), IsInAnimation(), maBitmapEx, maList, n, and SAL_WARN_IF.
|
inline |
Definition at line 53 of file Animation.hxx.
Referenced by Adjust(), Convert(), BitmapFilter::Filter(), Insert(), Invert(), Mirror(), and ReduceColors().
bool Animation::IsTransparent | ( | ) | const |
Definition at line 109 of file Animation.cxx.
References Back, BitmapEx::IsAlpha(), maBitmapEx, maGlobalSize, maList, and Point.
void Animation::Mirror | ( | BmpMirrorFlags | nMirrorFlags | ) |
Definition at line 498 of file Animation.cxx.
References Size::Height(), Horizontal, i, IsInAnimation(), AnimationBitmap::maBitmapEx, maBitmapEx, maGlobalSize, maList, AnimationBitmap::maPositionPixel, AnimationBitmap::maSizePixel, BitmapEx::Mirror(), n, NONE, SAL_WARN_IF, Vertical, and Size::Width().
|
inline |
Definition at line 41 of file Animation.hxx.
Definition at line 69 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 88 of file Animation.cxx.
References maBitmapEx, maGlobalSize, and maList.
bool Animation::ReduceColors | ( | sal_uInt16 | nNewColorCount | ) |
Definition at line 451 of file Animation.cxx.
References BitmapFilter::Filter(), i, IsInAnimation(), maBitmapEx, maList, n, and SAL_WARN_IF.
void Animation::Replace | ( | const AnimationBitmap & | rNewAnimationBmp, |
sal_uInt16 | nAnimation | ||
) |
Definition at line 407 of file Animation.cxx.
References AnimationBitmap::maBitmapEx, maBitmapEx, maList, mbLoopTerminated, and SAL_WARN_IF.
void Animation::ResetLoopCount | ( | ) |
Definition at line 428 of file Animation.cxx.
References mbLoopTerminated, mnLoopCount, and mnLoops.
Referenced by ReadAnimation(), and SetLoopCount().
Definition at line 60 of file Animation.hxx.
Referenced by BitmapFilter::Filter(), and TypeSerializer::readGraphic().
Definition at line 57 of file Animation.hxx.
void Animation::SetLoopCount | ( | const sal_uInt32 | nLoopCount | ) |
Definition at line 422 of file Animation.cxx.
References mnLoopCount, and ResetLoopCount().
Referenced by GraphicObject::GetTransformedGraphic().
Definition at line 66 of file Animation.hxx.
bool Animation::Start | ( | OutputDevice & | rOutDev, |
const Point & | rDestPt, | ||
const Size & | rDestSz, | ||
tools::Long | nExtraData, | ||
OutputDevice * | pFirstFrameOutDev | ||
) |
Definition at line 164 of file Animation.cxx.
References ANIMATION_TIMEOUT_ON_CLICK, Draw(), OutputDevice::GetOutDevType(), ImplRestartTimer(), OutputDevice::LogicToPixel(), maList, maTimer, maViewList, mbIsInAnimation, mbLoopTerminated, mnPos, OUTDEV_WINDOW, and Task::Stop().
void Animation::Stop | ( | const OutputDevice * | pOutDev = nullptr , |
tools::Long | nExtraData = 0 |
||
) |
Definition at line 220 of file Animation.cxx.
References maTimer, maViewList, mbIsInAnimation, and Task::Stop().
Referenced by IMPL_LINK_NOARG(), and ~Animation().
Definition at line 599 of file Animation.cxx.
Definition at line 553 of file Animation.cxx.
|
private |
Definition at line 103 of file Animation.hxx.
Referenced by Adjust(), Clear(), Convert(), IMPL_LINK_NOARG(), Insert(), Invert(), IsTransparent(), Mirror(), operator=(), operator==(), ReadAnimation(), ReduceColors(), and Replace().
|
private |
Definition at line 105 of file Animation.hxx.
Referenced by Clear(), Draw(), GetChecksum(), Insert(), IsTransparent(), Mirror(), operator=(), operator==(), ReadAnimation(), and WriteAnimation().
|
private |
Definition at line 99 of file Animation.hxx.
Referenced by Adjust(), Animation(), Clear(), Convert(), Draw(), Get(), GetChecksum(), GetSizeBytes(), IMPL_LINK_NOARG(), Insert(), Invert(), IsTransparent(), Mirror(), operator=(), operator==(), ReduceColors(), Replace(), and Start().
Definition at line 102 of file Animation.hxx.
Referenced by IMPL_LINK_NOARG().
|
private |
Definition at line 104 of file Animation.hxx.
Referenced by Animation(), Clear(), ImplRestartTimer(), Start(), and Stop().
|
private |
Definition at line 100 of file Animation.hxx.
Referenced by Clear(), IMPL_LINK_NOARG(), Start(), and Stop().
|
private |
Definition at line 109 of file Animation.hxx.
Referenced by Clear(), Start(), Stop(), and ~Animation().
|
private |
Definition at line 110 of file Animation.hxx.
Referenced by Animation(), Draw(), IMPL_LINK_NOARG(), operator=(), Replace(), ResetLoopCount(), and Start().
|
staticprivate |
Definition at line 97 of file Animation.hxx.
|
private |
Definition at line 106 of file Animation.hxx.
Referenced by Animation(), operator=(), ReadAnimation(), ResetLoopCount(), SetLoopCount(), and WriteAnimation().
|
private |
Definition at line 107 of file Animation.hxx.
Referenced by Animation(), IMPL_LINK_NOARG(), operator=(), and ResetLoopCount().
|
private |
Definition at line 108 of file Animation.hxx.
Referenced by Draw(), IMPL_LINK_NOARG(), operator=(), and Start().