Enum simplesvg::Fig
[−]
[src]
pub enum Fig { Rect(f32, f32, f32, f32), Circle(f32, f32, f32), Ellipse(f32, f32, f32, f32), Line(f32, f32, f32, f32), Text(f32, f32, String), Styled(Attr, Box<Fig>), Transformed(Trans, Box<Fig>), Multiple(Vec<Fig>), Shared(Rc<Fig>), // some variants omitted }
Figure parts
Variants
Rect(f32, f32, f32, f32)
x
, y
, width
, height
Circle(f32, f32, f32)
cx
, cy
, radius
Ellipse(f32, f32, f32, f32)
cx
, cy
, rx
, ry
Line(f32, f32, f32, f32)
x1
, y1
, x2
, y2
Text(f32, f32, String)
Text element, x
, y
, text
Styled(Attr, Box<Fig>)
With style attributes
Transformed(Trans, Box<Fig>)
With transformations
Multiple(Vec<Fig>)
A bunch of figure parts
Shared figure part.
Methods
impl Fig
[src]
fn styled(self, attr: Attr) -> Self
Apply style from attr
.
fn transformed(self, trans: Trans) -> Self
Apply transformations from trans
Turn self into a Fig::Shared
.
Trait Implementations
impl Clone for Fig
[src]
fn clone(&self) -> Fig
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more