31 normalColour (n), overColour (
o), downColour (d),
32 normalColourOn (n), overColourOn (
o), downColourOn (d),
34 maintainShapeProportions (
false),
109 .
reduced (outlineWidth * 0.5f);
130 if (outlineWidth > 0.0f)
Specifies a set of gaps to be left around the sides of a rectangle.
ValueType getTopAndBottom() const noexcept
Returns the sum of the top and bottom gaps.
Rectangle< ValueType > subtractedFrom(const Rectangle< ValueType > &original) const noexcept
Returns a rectangle with these borders removed from it.
ValueType getLeftAndRight() const noexcept
Returns the sum of the left and right gaps.
Represents a colour, also including a transparency value.
void repaint()
Marks the whole component as needing to be redrawn.
void setSize(int newWidth, int newHeight)
Changes the size of the component.
ImageEffectFilter * getComponentEffect() const noexcept
Returns the current component effect.
bool isEnabled() const noexcept
Returns true if the component (and all its parents) are enabled.
Rectangle< int > getLocalBounds() const noexcept
Returns the component's bounds, relative to its own origin.
void setComponentEffect(ImageEffectFilter *newEffect)
Adds an effect filter to alter the component's appearance.
void setShadowProperties(const DropShadow &newShadow)
Sets up parameters affecting the shadow's appearance.
A graphics context, used for drawing a component or image.
void fillPath(const Path &path) const
Fills a path using the currently selected colour or brush.
void setColour(Colour newColour)
Changes the current drawing colour.
void strokePath(const Path &path, const PathStrokeType &strokeType, const AffineTransform &transform={}) const
Draws a path's outline using the currently selected colour or brush.
Describes a type of stroke used to render a solid outline along a path.
A path is a sequence of lines and curves that may either form a closed shape or be open-ended.
AffineTransform getTransformToScaleToFit(float x, float y, float width, float height, bool preserveProportions, Justification justificationType=Justification::centred) const
Returns a transform that can be used to rescale the path to fit into a given space.
void applyTransform(const AffineTransform &transform) noexcept
Applies a 2D transform to all the vertices in the path.
Rectangle< float > getBounds() const noexcept
Returns the smallest rectangle that contains all points within the path.
A pair of (x, y) coordinates.
Rectangle< float > toFloat() const noexcept
Casts this rectangle to a Rectangle<float>.
Rectangle reduced(ValueType deltaX, ValueType deltaY) const noexcept
Returns a rectangle that is smaller than this one by a given amount.
Rectangle expanded(ValueType deltaX, ValueType deltaY) const noexcept
Returns a rectangle that is larger than this one by a given amount.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
Defines a drop-shadow effect.