use crate::style::{Color, FontKey};
#[derive(Clone, Debug)]
pub struct Watermark {
pub text: String,
pub rotation_deg: f32,
pub size: f32,
pub color: Color,
pub font: FontKey,
}
impl Watermark {
pub fn new(text: impl Into<String>) -> Self {
Watermark {
text: text.into(),
rotation_deg: 45.0,
size: 72.0,
color: Color::rgb(210, 210, 210),
font: FontKey::SANS_BOLD,
}
}
pub fn rotation(mut self, degrees: f32) -> Self {
self.rotation_deg = degrees;
self
}
pub fn size(mut self, size: f32) -> Self {
self.size = size;
self
}
pub fn color(mut self, color: Color) -> Self {
self.color = color;
self
}
}