use super::*;
#[derive(Clone, Copy, Data, Debug, Default, Eq, Hash, PartialEq)]
pub struct Color {
#[get(type(copy))]
pub red: u8,
#[get(type(copy))]
pub green: u8,
#[get(type(copy))]
pub blue: u8,
#[get(type(copy))]
pub alpha: u8,
}
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct GradientStop {
pub offset: f64,
pub color: Color,
}
#[derive(Clone, Data, Debug, PartialEq)]
pub struct LinearGradient {
pub start: (f64, f64),
pub end: (f64, f64),
pub stops: Vec<GradientStop>,
}
#[derive(Clone, Data, Debug, PartialEq)]
pub struct RadialGradient {
pub center: (f64, f64),
#[get(type(copy))]
pub radius: f64,
pub stops: Vec<GradientStop>,
}
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct Shadow {
pub offset_x: f64,
pub offset_y: f64,
pub blur: f64,
pub color: Color,
}
#[derive(Clone, Data, Debug, PartialEq)]
pub struct TextStyle {
pub family: String,
#[get(type(copy))]
pub size: f64,
pub weight: String,
pub style: String,
pub align: TextAlign,
pub vertical_align: TextVerticalAlign,
#[get(type(copy))]
pub line_height: f64,
#[get(type(copy))]
pub wrap: bool,
pub overflow: TextOverflow,
pub color: Color,
#[get(skip)]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub background: Option<Color>,
pub padding: (f64, f64, f64, f64),
#[get(type(copy))]
pub border_width: f64,
#[get(skip)]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub border_color: Option<Color>,
#[get(type(copy))]
pub border_radius: f64,
#[get(type(copy))]
pub rotate: f64,
#[get(type(copy))]
pub stroke_width: f64,
#[get(skip)]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub stroke_color: Option<Color>,
pub rich: Vec<(String, RichTextStyle)>,
}
#[derive(Clone, Debug, PartialEq)]
pub struct RichTextStyle {
pub family: Option<String>,
pub size: Option<f64>,
pub weight: Option<String>,
pub style: Option<String>,
pub color: Option<Color>,
pub background: Option<Color>,
pub padding: Option<(f64, f64, f64, f64)>,
pub line_height: Option<f64>,
}
#[derive(Clone, Data, Debug, PartialEq)]
pub struct LineStyle {
#[get(type(copy))]
pub width: f64,
pub cap: LineCap,
pub join: LineJoin,
pub dash: DashPattern,
#[get(type(copy))]
pub opacity: f64,
#[get(skip)]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub shadow: Option<Shadow>,
pub color: Color,
}
#[derive(Clone, Debug, PartialEq)]
pub struct ShapeStyle {
pub fill: Fill,
pub stroke: Stroke,
pub line_style: LineStyle,
pub shadow: Option<Shadow>,
pub opacity: f64,
}