|
wPlot2D version: 0.1.0
A lightweight C++ library for clear and customizable 2D scientific plots.
|
ESC component that defines the style of a line (solid, dotted, dashed). More...
#include <wLineStyleComponent.hpp>

Public Types | |
| enum class | LineStyle { Solid , Dotted , Dashed } |
| Available styles for line rendering. More... | |
Public Member Functions | |
| LineStyleComponent (LineStyle style=LineStyle::Solid) | |
| Constructs a LineStyleComponent with an optional style. | |
| virtual | ~LineStyleComponent ()=default |
| LineStyle | getStyle () const |
| Returns the current line style. | |
| void | setStyle (LineStyle style) |
| Sets the current line style. | |
| float | getDashLength () const |
| Returns the dash length (used for Dashed style). | |
| void | setDashLength (float dashLength) |
| Sets the dash length. | |
| float | getGapLength () const |
| Returns the gap length (used for Dotted and Dashed styles). | |
| void | setGapLength (float gapLength) |
| Sets the gap length. | |
| void | debugPrint () const |
| Public Member Functions inherited from wEngine::Component | |
| virtual | ~Component ()=default |
| virtual void | enable () |
| virtual void | disable () |
| bool | isEnabled () const |
| Checks whether the component is currently active. | |
| void | setParent (Entity *parent) |
| Sets the parent entity of this component. | |
| Entity * | getParent () const |
| Returns the parent entity of this component. | |
Additional Inherited Members | |
| Protected Member Functions inherited from wEngine::Component | |
| Component () | |
| Protected constructor to restrict instantiation to derived classes. | |
ESC component that defines the style of a line (solid, dotted, dashed).
This component controls how lines are drawn in the rendering pipeline. For dotted and dashed styles, both dash length and gap length can be configured.
|
strong |
| wEngine::LineStyleComponent::LineStyleComponent | ( | LineStyle | style = LineStyle::Solid | ) |
Constructs a LineStyleComponent with an optional style.
| style | Line style to use (default: Solid). |
|
virtualdefault |
|
nodiscard |
Returns the current line style.
| void wEngine::LineStyleComponent::setStyle | ( | LineStyle | style | ) |
Sets the current line style.
| style | New line style to apply. |
|
nodiscard |
Returns the dash length (used for Dashed style).
| void wEngine::LineStyleComponent::setDashLength | ( | float | dashLength | ) |
Sets the dash length.
| dashLength | Dash length in pixels. |
| std::invalid_argument | if dashLength <= 0. |
|
nodiscard |
Returns the gap length (used for Dotted and Dashed styles).
| void wEngine::LineStyleComponent::setGapLength | ( | float | gapLength | ) |
Sets the gap length.
| gapLength | Gap length in pixels. |
| std::invalid_argument | if gapLength < 0. |
| void wEngine::LineStyleComponent::debugPrint | ( | ) | const |