pub enum Paint<'a> {
None,
Inherit,
CurrentColor,
Color(Color),
FuncIRI(&'a str, Option<PaintFallback>),
}Expand description
Representation of the <paint> type.
Doesn’t own the data. Use only for parsing.
<icccolor> isn’t supported.
Examples
use svgtypes::{Paint, PaintFallback, Color};
let paint = Paint::from_str("url(#gradient) red").unwrap();
assert_eq!(paint, Paint::FuncIRI("gradient",
Some(PaintFallback::Color(Color::red()))));
let paint = Paint::from_str("inherit").unwrap();
assert_eq!(paint, Paint::Inherit);Variants§
None
The none value.
Inherit
The inherit value.
CurrentColor
The currentColor value.
Color(Color)
<color> value.
FuncIRI(&'a str, Option<PaintFallback>)
<FuncIRI> value with an optional fallback.