A Drawable object which draws a rectangle.
For details on how to change the fill and stroke, see the DrawableShape class.
- See also
- Drawable, DrawableShape
|
| | DrawableRectangle ()=default |
| |
| void | setRectangle (Parallelogram< float > newBounds) |
| | Sets the rectangle's bounds.
|
| |
| Parallelogram< float > | getRectangle () const noexcept |
| | Returns the rectangle's bounds.
|
| |
| Point< float > | getCornerSize () const noexcept |
| | Returns the corner size to be used.
|
| |
| void | setCornerSize (Point< float > newSize) |
| | Sets a new corner size for the rectangle.
|
| |
| std::unique_ptr< Drawable > | createCopy () const override |
| | Creates a deep copy of this Drawable object.
|
| |
| void | setFill (const FillType &newFill) |
| | Sets a fill type for the path.
|
| |
| const FillType & | getFill () const noexcept |
| | Returns the current fill type.
|
| |
| void | setStrokeFill (const FillType &newStrokeFill) |
| | Sets the fill type with which the outline will be drawn.
|
| |
| const FillType & | getStrokeFill () const noexcept |
| | Returns the current stroke fill.
|
| |
| void | setStrokeType (const PathStrokeType &newStrokeType) |
| | Changes the properties of the outline that will be drawn around the path.
|
| |
| void | setStrokeThickness (float newThickness) |
| | Changes the stroke thickness.
|
| |
| PathStrokeType | getStrokeType () const noexcept |
| | Returns the current outline style.
|
| |
| void | setDashLengths (Span< const float > newDashLengths) |
| | Provides a set of dash lengths to use for stroking the path.
|
| |
| void | setDashOffset (float dashOffset) |
| | Provides an offset on the rendering of the associated dash array.
|
| |
| Span< const float > | getDashLengths () const & |
| | Returns the set of dash lengths that the path is using.
|
| |
| Span< const float > | getDashLengths () const &&=delete |
| |
| Rectangle< float > | getDrawableBoundsUntransformed () const override |
| | Returns the area that this drawable covers in its original coordinate system.
|
| |
| bool | hitTest (Point< float >) const override |
| | Tests whether a given point is inside the Drawable.
|
| |
| bool | replaceColour (Colour originalColour, Colour replacementColour) override |
| | Recursively replaces a colour that might be used for filling or stroking.
|
| |
| Path | getOutlineAsPath () const override |
| | Creates a path that describes the outline of this drawable.
|
| |
| | Drawable ()=default |
| | Constructor.
|
| |
| | Drawable (const Drawable &other) |
| | Copy constructor.
|
| |
| virtual | ~Drawable ()=default |
| | Destructor.
|
| |
| void | draw (Graphics &g, float opacity, const AffineTransform &transform=AffineTransform()) const |
| | Renders this Drawable object.
|
| |
| void | drawAt (Graphics &g, float x, float y, float opacity) const |
| | Renders the Drawable at a given offset within the Graphics context.
|
| |
| void | drawWithin (Graphics &g, Rectangle< float > destArea, RectanglePlacement placement, float opacity) const |
| | Renders the Drawable within a rectangle, scaling it to fit neatly inside without changing its aspect-ratio.
|
| |
| void | setClipPath (std::unique_ptr< Drawable > drawableClipPath) |
| | Sets a the clipping region of this drawable using another drawable.
|
| |
| Rectangle< float > | getDrawableBounds () const |
| | Returns the area that this drawable covers.
|
| |
| int | getWidth () const |
| | Returns the width of the drawable bounds rounded up to the nearest integer.
|
| |
| int | getHeight () const |
| | Returns the height of the drawable bounds rounded up to the nearest integer.
|
| |
| void | setDrawableTransform (const AffineTransform &transform) |
| | Sets a transformation that applies to the same coordinate system in which the rest of the draw calls are made.
|
| |
| void | setDrawableTransformToFit (const Rectangle< float > &area, RectanglePlacement placement) |
| | Calls setDrawableTransform() with a transform that will position this Drawable within the specified area in the untransformed coordinate system of the Drawable.
|
| |
| AffineTransform | getDrawableTransform () const |
| | Returns the transform that is currently being applied to this drawable.
|
| |
| const String & | getName () const |
| | Returns the name of this Drawable object.
|
| |
| void | setName (const String &newName) |
| | Sets the name of this drawable object.
|
| |
| void | addListener (Listener *newListener) |
| | Adds a listener.
|
| |
| void | removeListener (Listener *listenerToRemove) |
| | Removes a listener.
|
| |
| virtual bool | isImage () const |
| |
| virtual std::optional< String > | getContainedText () const |
| |
| virtual bool | requiresBlendBuffer () const |
| |