pub struct WatermarkProps {Show 14 fields
pub z_index: i32,
pub rotate: f32,
pub width: Option<f32>,
pub height: Option<f32>,
pub image: Option<String>,
pub content: Option<Vec<String>>,
pub font: Option<WatermarkFont>,
pub gap: Option<[f32; 2]>,
pub offset: Option<[f32; 2]>,
pub class: Option<String>,
pub root_class: Option<String>,
pub style: Option<String>,
pub inherit: bool,
pub children: Element,
}Expand description
Props for the Watermark component.
Fields§
§z_index: i32Z-index of the watermark layer. Defaults to 9.
rotate: f32Rotation angle in degrees. Defaults to -22.
width: Option<f32>Width of the watermark. Auto-calculated if not provided.
height: Option<f32>Height of the watermark. Auto-calculated if not provided.
image: Option<String>Image URL for image watermarks. Takes precedence over content.
content: Option<Vec<String>>Text content for the watermark. Can be a single string or multiple lines.
font: Option<WatermarkFont>Font configuration for text watermarks.
gap: Option<[f32; 2]>Gap between watermarks as [horizontal, vertical]. Defaults to [100, 100].
offset: Option<[f32; 2]>Offset of the watermark from top-left as [left, top].
class: Option<String>Extra class name for the wrapper.
root_class: Option<String>Extra class name for the root element.
style: Option<String>Inline style for the wrapper.
inherit: boolWhether nested watermark contexts should inherit this watermark.
children: ElementContent to be watermarked.
Implementations§
Source§impl WatermarkProps
impl WatermarkProps
Sourcepub fn builder() -> WatermarkPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> WatermarkPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building WatermarkProps.
On the builder, call .z_index(...)(optional), .rotate(...)(optional), .width(...)(optional), .height(...)(optional), .image(...)(optional), .content(...)(optional), .font(...)(optional), .gap(...)(optional), .offset(...)(optional), .class(...)(optional), .root_class(...)(optional), .style(...)(optional), .inherit(...)(optional), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of WatermarkProps.
Trait Implementations§
Source§impl Clone for WatermarkProps
impl Clone for WatermarkProps
Source§fn clone(&self) -> WatermarkProps
fn clone(&self) -> WatermarkProps
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more