Coverage Report

Created: 2025-12-31 10:39

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/include/vcl/animate/AnimationFrame.hxx
Line
Count
Source
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
 * This file is part of the LibreOffice project.
4
 *
5
 * This Source Code Form is subject to the terms of the Mozilla Public
6
 * License, v. 2.0. If a copy of the MPL was not distributed with this
7
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
 *
9
 * This file incorporates work covered by the following license notice:
10
 *
11
 *   Licensed to the Apache Software Foundation (ASF) under one or more
12
 *   contributor license agreements. See the NOTICE file distributed
13
 *   with this work for additional information regarding copyright
14
 *   ownership. The ASF licenses this file to you under the Apache
15
 *   License, Version 2.0 (the "License"); you may not use this file
16
 *   except in compliance with the License. You may obtain a copy of
17
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
18
 */
19
20
#pragma once
21
22
#include <vcl/bitmap.hxx>
23
24
enum class Disposal
25
{
26
    Not,
27
    Back,
28
    Previous
29
};
30
31
enum class Blend
32
{
33
    Source,
34
    Over
35
};
36
37
struct AnimationFrame
38
{
39
    Bitmap maBitmap;
40
    Point maPositionPixel;
41
    Size maSizePixel;
42
    tools::Long mnWait;
43
    Disposal meDisposal;
44
    Blend meBlend;
45
    bool mbUserInput;
46
47
    AnimationFrame()
48
61.1k
        : mnWait(0)
49
61.1k
        , meDisposal(Disposal::Not)
50
61.1k
        , meBlend(Blend::Over)
51
61.1k
        , mbUserInput(false)
52
61.1k
    {
53
61.1k
    }
54
55
    AnimationFrame(const Bitmap& rBitmap, const Point& rPositionPixel, const Size& rSizePixel,
56
                   tools::Long nWait = 0, Disposal eDisposal = Disposal::Not,
57
                   Blend eBlend = Blend::Over)
58
12.4k
        : maBitmap(rBitmap)
59
12.4k
        , maPositionPixel(rPositionPixel)
60
12.4k
        , maSizePixel(rSizePixel)
61
12.4k
        , mnWait(nWait)
62
12.4k
        , meDisposal(eDisposal)
63
12.4k
        , meBlend(eBlend)
64
12.4k
        , mbUserInput(false)
65
12.4k
    {
66
12.4k
    }
67
68
    bool operator==(const AnimationFrame& rAnimationFrame) const
69
0
    {
70
0
        return (rAnimationFrame.maBitmap == maBitmap
71
0
                && rAnimationFrame.maPositionPixel == maPositionPixel
72
0
                && rAnimationFrame.maSizePixel == maSizePixel && rAnimationFrame.mnWait == mnWait
73
0
                && rAnimationFrame.meDisposal == meDisposal && rAnimationFrame.meBlend == meBlend
74
0
                && rAnimationFrame.mbUserInput == mbUserInput);
75
0
    }
76
77
    bool operator!=(const AnimationFrame& rAnimationFrame) const
78
0
    {
79
0
        return !(*this == rAnimationFrame);
80
0
    }
81
82
    BitmapChecksum GetChecksum() const;
83
};
84
85
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */