class RectangleWidget
Defined in:
The C4Widgets.h
RectangleWidget
class represents an interface widget that displays a rectangle.
Definition
class RectangleWidget : public FillableWidget
Constructor
RectangleWidget(const Vector2D& size, float thickness, const ColorRGBA& stroke);
RectangleWidget(const Vector2D& size, float thickness, const ColorRGBA& stroke, const ColorRGBA& fill);
RectangleWidget(const Vector2D& size, const ColorRGBA& fill);
Parameters
size |
The size of the rectangle, in pixels. |
thickness |
The thickness of the stroke, in pixels. |
stroke |
The initial color of the stroke. |
fill |
The initial color of the fill. |
Description
The RectangleWidget
class is used to render a rectangle with either square or rounded corners.If a constructor without the
fill
parameter is called, then the rectangle has no fill. If a constructor without the thickness
and stroke
parameters is called, then the rectangle has no stroke.The default widget color corresponds to the
kWidgetColorLine
color type. The kWidgetColorFill
color types is also supported, and it controls the rectangle's fill color.
Base Classes
FillableWidget |
Rectangle widgets are composed of fills and strokes rendered with Slug. |
See Also
Wiki Articles