class LineWidget
Defined in:
The C4Widgets.hLineWidget class represents an interface widget that displays a straight line.
Definition
class LineWidget final : public StrokableWidget
Constructor
LineWidget(const Vector2D& size, float thickness, Slug::StrokeCapType capType = Slug::kStrokeCapFlat, const ColorRGBA& color = Color::black);
Parameters
size |
The size of the line, in pixels. |
thickness |
The thickness of the stroke, in pixels. |
capType |
The type of caps applied to the stroke. |
color |
The initial color of the line. |
Description
The LineWidget class is used to render a straight line segment. Its length is determined by the width of the widget, given by the x component of the size parameter. The y component of the size parameter should normally be set to 1.0, but any positive value is valid and does not affect the appearance of the line.The line is always rendered horizontally in the widget's local coordinate space. Lines are drawn in different directions by assigning a rotation to the widget's transform.
The default widget color corresponds to the
kWidgetColorLine color type. No other color types are supported by the line widget.
Base Classes
StrokableWidget |
Line widgets are strokes rendered with Slug. |
See Also
Wiki Articles
