Everything needed to stroke a path, as one value. More...
#include <path.hpp>
Public Member Functions | |
| bool | operator== (const StrokeStyle &o) const |
| bool | operator!= (const StrokeStyle &o) const |
Public Attributes | |
| float | width = 1.0f |
| LineCap | cap = LineCap::butt |
| LineJoin | join = LineJoin::miter |
| float | miter_limit = 4.0f |
| std::vector< float > | dash |
| Dash pattern: alternating on/off lengths in user units. | |
| float | dash_phase = 0.0f |
Everything needed to stroke a path, as one value.
Bundling these means stroke_path(path, style) is a single call that cannot be half-configured — the immediate-mode API's set_line_width / set_line_cap / set_line_join triplet leaks state between draws and is a recurring source of "why is this stroke the wrong width" bugs.
|
inline |
|
inline |
| LineCap pulp::canvas::StrokeStyle::cap = LineCap::butt |
| std::vector<float> pulp::canvas::StrokeStyle::dash |
Dash pattern: alternating on/off lengths in user units.
Empty = solid. An odd-length pattern is repeated to make it even, per the SVG and Canvas2D convention ([5] behaves as [5, 5]).
| float pulp::canvas::StrokeStyle::dash_phase = 0.0f |
| LineJoin pulp::canvas::StrokeStyle::join = LineJoin::miter |
| float pulp::canvas::StrokeStyle::miter_limit = 4.0f |
| float pulp::canvas::StrokeStyle::width = 1.0f |