euv_chart/paint/enum.rs
1use super::*;
2
3/// The alignment of a text label.
4#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
5pub enum TextAlign {
6 /// The text starts at the anchor point and runs to the right.
7 #[default]
8 Left,
9 /// The text is centred on the anchor point.
10 Center,
11 /// The text ends at the anchor point and runs to the left.
12 Right,
13}
14
15/// The vertical alignment of a text label.
16#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
17pub enum TextVerticalAlign {
18 /// The text's top edge sits on the anchor point.
19 Top,
20 /// The text is vertically centred on the anchor point.
21 #[default]
22 Middle,
23 /// The text's bottom edge sits on the anchor point.
24 Bottom,
25 /// The text's baseline sits on the anchor point.
26 Baseline,
27}
28
29/// What happens to text that does not fit inside its box.
30#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
31pub enum TextOverflow {
32 /// The text is truncated with an ellipsis.
33 #[default]
34 Truncate,
35 /// The text is hidden entirely.
36 None,
37 /// The text overflows its box without being cut.
38 Break,
39}
40
41/// How a shape is filled.
42#[derive(Clone, Debug, Default, PartialEq)]
43pub enum Fill {
44 /// The shape is filled with a single colour.
45 Solid(Color),
46 /// The shape is filled with a linear gradient.
47 Linear(LinearGradient),
48 /// The shape is filled with a radial gradient.
49 Radial(RadialGradient),
50 /// The shape is not filled.
51 #[default]
52 None,
53}
54
55/// How a shape is stroked.
56#[derive(Clone, Debug, Default, PartialEq)]
57pub enum Stroke {
58 /// The shape is stroked with a single colour.
59 Solid(Color),
60 /// The shape is stroked with a linear gradient.
61 Linear(LinearGradient),
62 /// The shape is stroked with a radial gradient.
63 Radial(RadialGradient),
64 /// The shape is not stroked.
65 #[default]
66 None,
67}
68
69/// The dash pattern of a line, expressed in ECharts' `lineStyle.type`
70/// vocabulary.
71#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
72pub enum LineDashType {
73 /// A solid line.
74 #[default]
75 Solid,
76 /// Dashed.
77 Dashed,
78 /// Dotted.
79 Dotted,
80}