fret_core/scene/stroke.rs
1use crate::geometry::Px;
2
3/// Dash pattern for stroke-like primitives.
4///
5/// Units are logical pixels (scale-aware; the renderer multiplies by the current scale factor).
6#[derive(Debug, Clone, Copy, PartialEq)]
7pub struct DashPatternV1 {
8 pub dash: Px,
9 pub gap: Px,
10 pub phase: Px,
11}
12
13impl DashPatternV1 {
14 pub const fn new(dash: Px, gap: Px, phase: Px) -> Self {
15 Self { dash, gap, phase }
16 }
17}
18
19#[derive(Debug, Clone, Copy, PartialEq, Default)]
20pub struct StrokeStyleV1 {
21 pub dash: Option<DashPatternV1>,
22}