pub enum SvgNodeData {
Show 13 variants
ImageClipMask(ImageMask),
Path(SvgMultiPolygon),
Circle {
cx: f32,
cy: f32,
r: f32,
},
Rect {
x: f32,
y: f32,
width: f32,
height: f32,
rx: f32,
ry: f32,
},
Ellipse {
cx: f32,
cy: f32,
rx: f32,
ry: f32,
},
Line {
x1: f32,
y1: f32,
x2: f32,
y2: f32,
},
PointsList {
points: Vec<SvgPoint>,
closed: bool,
},
ViewBox {
min_x: f32,
min_y: f32,
width: f32,
height: f32,
},
LinearGradient {
x1: f32,
y1: f32,
x2: f32,
y2: f32,
},
RadialGradient {
cx: f32,
cy: f32,
r: f32,
fx: f32,
fy: f32,
},
GradientStop {
offset: f32,
},
Use {
href: AzString,
x: f32,
y: f32,
},
SvgImageData {
href: AzString,
x: f32,
y: f32,
width: f32,
height: f32,
},
}Expand description
SVG-specific data stored on a DOM node.
Each SVG element type stores its parsed attribute data here. Also used for raster image clip masks (legacy C API).
Variants§
ImageClipMask(ImageMask)
Raster R8 image clip mask (legacy C API for chart.c style manual masks).
Path(SvgMultiPolygon)
<path d="..."> — resolved path geometry.
Circle
<circle cx="" cy="" r="">.
Rect
<rect x="" y="" width="" height="" rx="" ry="">.
Ellipse
<ellipse cx="" cy="" rx="" ry="">.
Line
<line x1="" y1="" x2="" y2="">.
PointsList
<polygon points=""> / <polyline points=""> — parsed point list.
ViewBox
<svg viewBox="" width="" height=""> — viewport attributes.
LinearGradient
<linearGradient> attributes.
RadialGradient
<radialGradient> attributes.
GradientStop
<stop offset="" stop-color="" stop-opacity="">.
Use
<use href="" x="" y="">.
SvgImageData
<image href="" x="" y="" width="" height="">.
Trait Implementations§
Source§impl Clone for SvgNodeData
impl Clone for SvgNodeData
Source§fn clone(&self) -> SvgNodeData
fn clone(&self) -> SvgNodeData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SvgNodeData
impl Debug for SvgNodeData
Source§impl Hash for SvgNodeData
impl Hash for SvgNodeData
Source§impl Ord for SvgNodeData
impl Ord for SvgNodeData
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SvgNodeData
impl PartialEq for SvgNodeData
Source§fn eq(&self, other: &SvgNodeData) -> bool
fn eq(&self, other: &SvgNodeData) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SvgNodeData
impl PartialOrd for SvgNodeData
impl Eq for SvgNodeData
impl StructuralPartialEq for SvgNodeData
Auto Trait Implementations§
impl Freeze for SvgNodeData
impl RefUnwindSafe for SvgNodeData
impl Send for SvgNodeData
impl Sync for SvgNodeData
impl Unpin for SvgNodeData
impl UnsafeUnpin for SvgNodeData
impl UnwindSafe for SvgNodeData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more