29DrawableRectangle::DrawableRectangle() {}
34 bounds (
other.bounds),
35 cornerSize (
other.cornerSize)
42 return std::make_unique<DrawableRectangle> (*
this);
64void DrawableRectangle::rebuildPath()
71 if (cornerSize.
x > 0 && cornerSize.
y > 0)
74 newPath.addRectangle (0, 0, w, h);
A Drawable object which draws a rectangle.
void setRectangle(Parallelogram< float > newBounds)
Sets the rectangle's bounds.
~DrawableRectangle() override
Destructor.
std::unique_ptr< Drawable > createCopy() const override
Creates a deep copy of this Drawable object.
void setCornerSize(Point< float > newSize)
Sets a new corner size for the rectangle.
A base class implementing common functionality for Drawable classes which consist of some kind of fil...
void pathChanged()
Called when the cached path should be updated.
Represents a parallelogram that is defined by 3 points.
ValueType getWidth() const noexcept
Returns the width of the parallelogram (i.e.
ValueType getHeight() const noexcept
Returns the height of the parallelogram (i.e.
A path is a sequence of lines and curves that may either form a closed shape or be open-ended.
void addRoundedRectangle(float x, float y, float width, float height, float cornerSize)
Adds a rectangle with rounded corners to the path.
void swapWithPath(Path &) noexcept
Swaps the contents of this path with another one.
A pair of (x, y) coordinates.
ValueType y
The point's Y coordinate.
ValueType x
The point's X coordinate.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...