pub struct SvgBackend { /* private fields */ }Expand description
Accumulates SVG markup for a plot rendered via DrawBackend.
Implementations§
Trait Implementations§
Source§impl DrawBackend for SvgBackend
impl DrawBackend for SvgBackend
fn plot_area(&self) -> Rect
fn total_area(&self) -> Rect
fn draw_circle( &mut self, (cx, cy): (f64, f64), radius: f64, style: &PointStyle, ) -> Result<(), RenderError>
fn draw_line( &mut self, pts: &[(f64, f64)], style: &LineStyle, ) -> Result<(), RenderError>
fn draw_rect( &mut self, (x0, y0): (f64, f64), (x1, y1): (f64, f64), style: &RectStyle, ) -> Result<(), RenderError>
fn draw_polygon( &mut self, pts: &[(f64, f64)], style: &RectStyle, ) -> Result<(), RenderError>
fn draw_text( &mut self, text: &str, (x, y): (f64, f64), style: &TextStyle, ) -> Result<(), RenderError>
Source§fn draw_shape(
&mut self,
center: (f64, f64),
radius: f64,
style: &PointStyle,
) -> Result<(), RenderError>
fn draw_shape( &mut self, center: (f64, f64), radius: f64, style: &PointStyle, ) -> Result<(), RenderError>
Draw a point with a specific shape. Default delegates to draw_circle for Circle.
Auto Trait Implementations§
impl Freeze for SvgBackend
impl RefUnwindSafe for SvgBackend
impl Send for SvgBackend
impl Sync for SvgBackend
impl Unpin for SvgBackend
impl UnsafeUnpin for SvgBackend
impl UnwindSafe for SvgBackend
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more