nuit_core/node/
modifier.rs

1use serde::{Serialize, Deserialize};
2
3use crate::{Alignment, Angle, Font, Frame, Insets, Style, UnitPoint, Vec2};
4
5/// A rendered modifier.
6#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7#[serde(rename_all = "camelCase", rename_all_fields = "camelCase")]
8pub enum ModifierNode {
9    Padding { insets: Insets },
10    Position { position: Vec2<f64> },
11    Offset { delta: Vec2<f64> },
12    Opacity { opacity: f64 },
13    Frame { frame: Frame, alignment: Alignment },
14    Fill { style: Style },
15    Font { font: Font },
16    ForegroundStyle { style: Style },
17    ScaleEffect { factor: f64, anchor: UnitPoint },
18    RotationEffect { angle: Angle, anchor: UnitPoint },
19}