|
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 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 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< AnimationFrame > > & | GetAnimationFrames () |
| size_t | Count () const |
| bool | Insert (const AnimationFrame &rAnimationFrame) |
| const AnimationFrame & | Get (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 std::vector< std::unique_ptr< AnimationData > > | CreateAnimationDataItems () |
| SAL_DLLPRIVATE void | PopulateRenderers () |
| SAL_DLLPRIVATE void | RenderNextFrameInAllRenderers () |
| SAL_DLLPRIVATE void | PruneMarkedRenderers () |
| SAL_DLLPRIVATE bool | IsAnyRendererActive () |
| 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 | mnFrameIndex |
| bool | mbIsInAnimation |
| bool | mbLoopTerminated |
Static Private Attributes | |
| static SAL_DLLPRIVATE sal_uLong | gAnimationRendererCount = 0 |
Friends | |
| SvStream & | ReadAnimation (SvStream &rIStream, Animation &rAnimation) |
| SvStream & | WriteAnimation (SvStream &rOStream, const Animation &rAnimation) |
Definition at line 33 of file Animation.hxx.
| Animation::Animation | ( | ) |
Definition at line 36 of file Animation.cxx.
References LINK, maTimer, mnLoopCount, and Timer::SetInvokeHandler().
| Animation::Animation | ( | const Animation & | rAnimation | ) |
Definition at line 47 of file Animation.cxx.
References LINK, maFrames, 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 566 of file Animation.cxx.
References BitmapEx::Adjust(), i, IsInAnimation(), maBitmapEx, maFrames, n, and SAL_WARN_IF.
| void Animation::Clear | ( | ) |
Definition at line 99 of file Animation.cxx.
References maBitmapEx, maFrames, maGlobalSize, maRenderers, maTimer, mbIsInAnimation, BitmapEx::SetEmpty(), and Task::Stop().
Referenced by operator=().
| void Animation::Convert | ( | BmpConversion | eConversion | ) |
Definition at line 467 of file Animation.cxx.
References BitmapEx::Convert(), i, IsInAnimation(), maBitmapEx, maFrames, n, and SAL_WARN_IF.
|
inline |
Definition at line 71 of file Animation.hxx.
Referenced by AnimationRenderer::draw(), AnimationRenderer::drawToIndex(), BitmapFilter::Filter(), GraphicObject::GetTransformedGraphic(), GraphicID::GraphicID(), and ImportTiffGraphicImport().
|
private |
Definition at line 285 of file Animation.cxx.
References maRenderers.
Referenced by PopulateRenderers().
|
private |
| void Animation::Draw | ( | OutputDevice & | rOutDev, |
| const Point & | rDestPt | ||
| ) | const |
Definition at line 238 of file Animation.cxx.
References Draw(), maGlobalSize, and OutputDevice::PixelToLogic().
| void Animation::Draw | ( | OutputDevice & | rOutDev, |
| const Point & | rDestPt, | ||
| const Size & | rDestSz | ||
| ) | const |
Definition at line 243 of file Animation.cxx.
References ANIMATION_TIMEOUT_ON_CLICK, BitmapEx::Draw(), OutputDevice::GetConnectMetaFile(), OutputDevice::GetOutDevType(), AnimationFrame::maBitmapEx, maFrames, mbLoopTerminated, mnFrameIndex, AnimationFrame::mnWait, nCount, and OUTDEV_PRINTER.
| const AnimationFrame & Animation::Get | ( | sal_uInt16 | nAnimation | ) | const |
Definition at line 434 of file Animation.cxx.
References maFrames, and SAL_WARN_IF.
Referenced by AnimationRenderer::draw(), and GraphicObject::GetTransformedGraphic().
|
inline |
Definition at line 70 of file Animation.hxx.
Referenced by BitmapFilter::Filter().
|
inline |
Definition at line 60 of file Animation.hxx.
Referenced by BitmapFilter::Filter(), GetChecksum(), GetSizeBytes(), and ImportTiffGraphicImport().
| BitmapChecksum Animation::GetChecksum | ( | ) | const |
Definition at line 140 of file Animation.cxx.
References BCToBCOA(), BITMAP_CHECKSUM_SIZE, GetBitmapEx(), BitmapEx::GetChecksum(), Size::Height(), i, maFrames, maGlobalSize, vcl_get_checksum(), and Size::Width().
|
inline |
Definition at line 57 of file Animation.hxx.
Referenced by AnimationRenderer::getPosSize(), GraphicObject::GetTransformedGraphic(), and GraphicID::GraphicID().
|
inline |
Definition at line 63 of file Animation.hxx.
References mnLoopCount.
Definition at line 68 of file Animation.hxx.
| sal_uLong Animation::GetSizeBytes | ( | ) | const |
Definition at line 128 of file Animation.cxx.
References GetBitmapEx(), BitmapEx::GetSizeBytes(), and maFrames.
|
inlinestatic |
Definition at line 94 of file Animation.hxx.
Referenced by AnimationRenderer::~AnimationRenderer().
|
inline |
Definition at line 95 of file Animation.hxx.
Referenced by AnimationRenderer::AnimationRenderer().
|
inlinestatic |
Definition at line 93 of file Animation.hxx.
Referenced by AnimationRenderer::AnimationRenderer().
|
private |
Definition at line 279 of file Animation.cxx.
References maTimer, Timer::SetTimeout(), and Timer::Start().
Referenced by RenderNextFrameInAllRenderers(), and Start().
| bool Animation::Insert | ( | const AnimationFrame & | rAnimationFrame | ) |
Definition at line 411 of file Animation.cxx.
References tools::Rectangle::GetSize(), IsInAnimation(), maBitmapEx, AnimationFrame::maBitmapEx, maFrames, maGlobalSize, AnimationFrame::maPositionPixel, AnimationFrame::maSizePixel, and tools::Rectangle::Union().
Referenced by ImportTiffGraphicImport().
| bool Animation::Invert | ( | ) |
Definition at line 510 of file Animation.cxx.
References i, BitmapEx::Invert(), IsInAnimation(), maBitmapEx, maFrames, n, and SAL_WARN_IF.
|
private |
Definition at line 376 of file Animation.cxx.
References maRenderers.
|
inline |
Definition at line 54 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 BitmapEx::IsAlpha(), maBitmapEx, maFrames, and maGlobalSize.
| void Animation::Mirror | ( | BmpMirrorFlags | nMirrorFlags | ) |
Definition at line 531 of file Animation.cxx.
References Size::Height(), Horizontal, i, IsInAnimation(), maBitmapEx, AnimationFrame::maBitmapEx, maFrames, maGlobalSize, AnimationFrame::maPositionPixel, AnimationFrame::maSizePixel, BitmapEx::Mirror(), n, NONE, SAL_WARN_IF, Point::setX(), Point::setY(), Vertical, Size::Width(), Point::X(), and Point::Y().
|
inline |
Definition at line 42 of file Animation.hxx.
Definition at line 69 of file Animation.cxx.
References Clear(), i, maBitmapEx, maFrames, maGlobalSize, mbLoopTerminated, mnFrameIndex, mnLoopCount, and mnLoops.
| bool Animation::operator== | ( | const Animation & | rAnimation | ) | const |
Definition at line 88 of file Animation.cxx.
References maBitmapEx, maFrames, and maGlobalSize.
|
private |
Definition at line 297 of file Animation.cxx.
References CreateAnimationDataItems(), maRenderers, AnimationRenderer::pause(), and AnimationRenderer::setMarked().
|
private |
Definition at line 364 of file Animation.cxx.
References maRenderers.
| bool Animation::ReduceColors | ( | sal_uInt16 | nNewColorCount | ) |
Definition at line 484 of file Animation.cxx.
References BitmapFilter::Filter(), i, IsInAnimation(), maBitmapEx, maFrames, n, and SAL_WARN_IF.
|
private |
Definition at line 320 of file Animation.cxx.
References get(), ImplRestartTimer(), maBitmapEx, maFrames, maRenderers, mbLoopTerminated, mnFrameIndex, mnLoops, AnimationFrame::mnWait, and Stop().
| void Animation::Replace | ( | const AnimationFrame & | rNewAnimationBmp, |
| sal_uInt16 | nAnimation | ||
| ) |
Definition at line 440 of file Animation.cxx.
References maBitmapEx, AnimationFrame::maBitmapEx, maFrames, mbLoopTerminated, and SAL_WARN_IF.
Referenced by GraphicObject::GetTransformedGraphic().
| void Animation::ResetLoopCount | ( | ) |
Definition at line 461 of file Animation.cxx.
References mbLoopTerminated, mnLoopCount, and mnLoops.
Referenced by SetLoopCount().
|
inline |
Definition at line 61 of file Animation.hxx.
Referenced by BitmapFilter::Filter(), and TypeSerializer::readGraphic().
|
inline |
Definition at line 58 of file Animation.hxx.
Referenced by GraphicObject::GetTransformedGraphic().
| void Animation::SetLoopCount | ( | const sal_uInt32 | nLoopCount | ) |
Definition at line 455 of file Animation.cxx.
References mnLoopCount, and ResetLoopCount().
Referenced by GraphicObject::GetTransformedGraphic().
Definition at line 67 of file Animation.hxx.
| bool Animation::Start | ( | OutputDevice & | rOutDev, |
| const Point & | rDestPt, | ||
| const Size & | rDestSz, | ||
| tools::Long | nRendererId, | ||
| OutputDevice * | pFirstFrameOutDev | ||
| ) |
Definition at line 164 of file Animation.cxx.
References ANIMATION_TIMEOUT_ON_CLICK, Draw(), OutputDevice::GetOutDevType(), ImplRestartTimer(), OutputDevice::LogicToPixel(), maFrames, maRenderers, maTimer, mbIsInAnimation, mbLoopTerminated, mnFrameIndex, OUTDEV_WINDOW, and Task::Stop().
| void Animation::Stop | ( | const OutputDevice * | pOutDev = nullptr, |
| tools::Long | nRendererId = 0 |
||
| ) |
Definition at line 222 of file Animation.cxx.
References maRenderers, maTimer, mbIsInAnimation, and Task::Stop().
Referenced by RenderNextFrameInAllRenderers(), and ~Animation().
Definition at line 634 of file Animation.cxx.
Definition at line 588 of file Animation.cxx.
|
staticprivate |
Definition at line 98 of file Animation.hxx.
|
private |
Definition at line 104 of file Animation.hxx.
Referenced by Adjust(), Clear(), Convert(), Insert(), Invert(), IsTransparent(), Mirror(), operator=(), operator==(), ReduceColors(), RenderNextFrameInAllRenderers(), and Replace().
|
private |
Definition at line 100 of file Animation.hxx.
Referenced by Adjust(), Animation(), Clear(), Convert(), Draw(), Get(), GetChecksum(), GetSizeBytes(), Insert(), Invert(), IsTransparent(), Mirror(), operator=(), operator==(), ReduceColors(), RenderNextFrameInAllRenderers(), Replace(), and Start().
|
private |
Definition at line 106 of file Animation.hxx.
Referenced by Clear(), Draw(), GetChecksum(), Insert(), IsTransparent(), Mirror(), operator=(), and operator==().
Definition at line 103 of file Animation.hxx.
|
private |
Definition at line 101 of file Animation.hxx.
Referenced by Clear(), CreateAnimationDataItems(), IsAnyRendererActive(), PopulateRenderers(), PruneMarkedRenderers(), RenderNextFrameInAllRenderers(), Start(), and Stop().
|
private |
Definition at line 105 of file Animation.hxx.
Referenced by Animation(), Clear(), ImplRestartTimer(), Start(), and Stop().
|
private |
Definition at line 110 of file Animation.hxx.
Referenced by Clear(), Start(), Stop(), and ~Animation().
|
private |
Definition at line 111 of file Animation.hxx.
Referenced by Animation(), Draw(), operator=(), RenderNextFrameInAllRenderers(), Replace(), ResetLoopCount(), and Start().
|
private |
Definition at line 109 of file Animation.hxx.
Referenced by Draw(), operator=(), RenderNextFrameInAllRenderers(), and Start().
|
private |
Definition at line 107 of file Animation.hxx.
Referenced by Animation(), operator=(), ResetLoopCount(), and SetLoopCount().
|
private |
Definition at line 108 of file Animation.hxx.
Referenced by Animation(), operator=(), RenderNextFrameInAllRenderers(), and ResetLoopCount().