pub(crate) struct SvgWriter {
pub(crate) content: Group,
pub(crate) overlay: Group,
pub(crate) defs: Definitions,
pub(crate) view_size: Point,
pub(crate) counter: usize,
}Fields§
§content: Group§overlay: Group§defs: Definitions§view_size: Point§counter: usizeImplementations§
Source§impl SvgWriter
impl SvgWriter
pub(crate) fn new() -> Self
pub(crate) fn grow_window(&mut self, point: Point, size: Point)
pub(crate) fn draw_rect( &mut self, top_left: Point, size: Point, stroke: Option<&str>, stroke_width: f64, fill: Option<&str>, rounded: f64, )
pub(crate) fn draw_circle_overlay( &mut self, center: Point, radius: f64, fill: &str, )
pub(crate) fn draw_line( &mut self, start: Point, end: Point, color: &str, width: f64, )
pub(crate) fn append_node<T>(&mut self, node: T)
pub(crate) fn draw_text( &mut self, pos: Point, text: &str, font_size: usize, color: &str, bold: bool, anchor: &str, family: FontFamily, )
pub(crate) fn draw_text_overlay( &mut self, pos: Point, text: &str, font_size: usize, color: &str, bold: bool, anchor: &str, family: FontFamily, )
pub(crate) fn draw_arrow( &mut self, path: &[BezierSegment], dashed: bool, head: (bool, bool), look: &StyleAttr, label: Option<&ArrowLabel>, tooltip: Option<&str>, )
pub(crate) fn finalize(self) -> String
Auto Trait Implementations§
impl Freeze for SvgWriter
impl !RefUnwindSafe for SvgWriter
impl Send for SvgWriter
impl Sync for SvgWriter
impl Unpin for SvgWriter
impl UnsafeUnpin for SvgWriter
impl !UnwindSafe for SvgWriter
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.