summaryrefslogtreecommitdiff
path: root/drawinglayer/source/primitive2d
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2022-07-19 21:22:23 +1000
committerTomaž Vajngerl <quikee@gmail.com>2022-09-16 10:08:43 +0200
commita2aaa6b77457041e08610eb4bced2d050ea7fa4f (patch)
tree73320fc2ffea386ae396016a5a33768c64b8caca /drawinglayer/source/primitive2d
parent3521cf575c1cede6b60318ddb561fc9184c8c16d (diff)
vcl: AnimationBitmap -> AnimationFrame
The emphasis is not quite right. An animation is made up a sequence of *frames*, not bitmaps. A frame includes such things as position, size, timeout till the next frame *as well as* a bitmap. Note: had to regenerate a bunch of precompiled headers Change-Id: Ib1959452653857555f41e01ac0151d08c41a3b1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/76460 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'drawinglayer/source/primitive2d')
-rw-r--r--drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
index e3a4ac764e32..223390c81e3e 100644
--- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
@@ -116,13 +116,13 @@ namespace drawinglayer::primitive2d
sal_uInt32 generateStepTime(sal_uInt32 nIndex) const
{
- const AnimationBitmap& rAnimationBitmap = maAnimation.Get(sal_uInt16(nIndex));
- sal_uInt32 nWaitTime(rAnimationBitmap.mnWait * 10);
+ const AnimationFrame& rAnimationFrame = maAnimation.Get(sal_uInt16(nIndex));
+ sal_uInt32 nWaitTime(rAnimationFrame.mnWait * 10);
// Take care of special value for MultiPage TIFFs. ATM these shall just
// show their first page. Later we will offer some switching when object
// is selected.
- if (ANIMATION_TIMEOUT_ON_CLICK == rAnimationBitmap.mnWait)
+ if (ANIMATION_TIMEOUT_ON_CLICK == rAnimationFrame.mnWait)
{
// ATM the huge value would block the timer, so
// use a long time to show first page (whole day)
@@ -250,14 +250,14 @@ namespace drawinglayer::primitive2d
while (mnNextFrameToPrepare <= nTarget)
{
// prepare step
- const AnimationBitmap& rAnimationBitmap = maAnimation.Get(sal_uInt16(mnNextFrameToPrepare));
+ const AnimationFrame& rAnimationFrame = maAnimation.Get(sal_uInt16(mnNextFrameToPrepare));
- switch (rAnimationBitmap.meDisposal)
+ switch (rAnimationFrame.meDisposal)
{
case Disposal::Not:
{
- maVirtualDevice->DrawBitmapEx(rAnimationBitmap.maPositionPixel, rAnimationBitmap.maBitmapEx);
- Bitmap aAlphaMask = rAnimationBitmap.maBitmapEx.GetAlpha();
+ maVirtualDevice->DrawBitmapEx(rAnimationFrame.maPositionPixel, rAnimationFrame.maBitmapEx);
+ Bitmap aAlphaMask = rAnimationFrame.maBitmapEx.GetAlpha();
if (aAlphaMask.IsEmpty())
{
@@ -269,7 +269,7 @@ namespace drawinglayer::primitive2d
else
{
BitmapEx aExpandVisibilityMask(aAlphaMask, aAlphaMask);
- maVirtualDeviceMask->DrawBitmapEx(rAnimationBitmap.maPositionPixel, aExpandVisibilityMask);
+ maVirtualDeviceMask->DrawBitmapEx(rAnimationFrame.maPositionPixel, aExpandVisibilityMask);
}
break;
@@ -277,15 +277,15 @@ namespace drawinglayer::primitive2d
case Disposal::Back:
{
// #i70772# react on no mask, for primitives, too.
- const Bitmap & rMask(rAnimationBitmap.maBitmapEx.GetAlpha());
- const Bitmap & rContent(rAnimationBitmap.maBitmapEx.GetBitmap());
+ const Bitmap & rMask(rAnimationFrame.maBitmapEx.GetAlpha());
+ const Bitmap & rContent(rAnimationFrame.maBitmapEx.GetBitmap());
maVirtualDeviceMask->Erase();
- maVirtualDevice->DrawBitmap(rAnimationBitmap.maPositionPixel, rContent);
+ maVirtualDevice->DrawBitmap(rAnimationFrame.maPositionPixel, rContent);
if (rMask.IsEmpty())
{
- const ::tools::Rectangle aRect(rAnimationBitmap.maPositionPixel, rContent.GetSizePixel());
+ const ::tools::Rectangle aRect(rAnimationFrame.maPositionPixel, rContent.GetSizePixel());
maVirtualDeviceMask->SetFillColor(COL_BLACK);
maVirtualDeviceMask->SetLineColor();
maVirtualDeviceMask->DrawRect(aRect);
@@ -293,16 +293,16 @@ namespace drawinglayer::primitive2d
else
{
BitmapEx aExpandVisibilityMask(rMask, rMask);
- maVirtualDeviceMask->DrawBitmapEx(rAnimationBitmap.maPositionPixel, aExpandVisibilityMask);
+ maVirtualDeviceMask->DrawBitmapEx(rAnimationFrame.maPositionPixel, aExpandVisibilityMask);
}
break;
}
case Disposal::Previous:
{
- maVirtualDevice->DrawBitmapEx(rAnimationBitmap.maPositionPixel, rAnimationBitmap.maBitmapEx);
- BitmapEx aExpandVisibilityMask(rAnimationBitmap.maBitmapEx.GetAlpha(), rAnimationBitmap.maBitmapEx.GetAlpha());
- maVirtualDeviceMask->DrawBitmapEx(rAnimationBitmap.maPositionPixel, aExpandVisibilityMask);
+ maVirtualDevice->DrawBitmapEx(rAnimationFrame.maPositionPixel, rAnimationFrame.maBitmapEx);
+ BitmapEx aExpandVisibilityMask(rAnimationFrame.maBitmapEx.GetAlpha(), rAnimationFrame.maBitmapEx.GetAlpha());
+ maVirtualDeviceMask->DrawBitmapEx(rAnimationFrame.maPositionPixel, aExpandVisibilityMask);
break;
}
}