Skip to content

Commit 8edd51a

Browse files
committed
Add clamp() method to IGraphicsEffect
1 parent 17a745d commit 8edd51a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

include/scratchcpp/igraphicseffect.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ class LIBSCRATCHCPP_EXPORT IGraphicsEffect
1717

1818
/*! Returns the name of the graphics effect. */
1919
virtual std::string name() const = 0;
20+
21+
/*! Returns the clamped value of the graphic effect. */
22+
virtual double clamp(double value) const = 0;
2023
};
2124

2225
} // namespace libscratchcpp

test/mocks/graphicseffectmock.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ class GraphicsEffectMock : public IGraphicsEffect
99
{
1010
public:
1111
MOCK_METHOD(std::string, name, (), (const, override));
12+
13+
MOCK_METHOD(double, clamp, (double), (const, override));
1214
};

0 commit comments

Comments
 (0)