[−][src]Struct plotters::drawing::CanvasBackend
The backend that is drawing on the HTML canvas TODO: Support double bufferring
Methods
impl CanvasBackend
[src]
pub fn new(elem_id: &str) -> Option<Self>
[src]
Create a new drawing backend backed with an HTML5 canvas object
elem_id
The element id for the canvas- Return either some drawing backend has been created, or none in error case
Trait Implementations
impl DrawingBackend for CanvasBackend
[src]
type ErrorType = CanvasError
The error type reported by the backend
fn get_size(&self) -> (u32, u32)
[src]
fn ensure_prepared(&mut self) -> Result<(), DrawingErrorKind<CanvasError>>
[src]
fn present(&mut self) -> Result<(), DrawingErrorKind<CanvasError>>
[src]
fn draw_pixel(
&mut self,
point: BackendCoord,
style: &RGBAColor
) -> Result<(), DrawingErrorKind<CanvasError>>
[src]
&mut self,
point: BackendCoord,
style: &RGBAColor
) -> Result<(), DrawingErrorKind<CanvasError>>
fn draw_line<S: BackendStyle>(
&mut self,
from: BackendCoord,
to: BackendCoord,
style: &S
) -> Result<(), DrawingErrorKind<Self::ErrorType>>
[src]
&mut self,
from: BackendCoord,
to: BackendCoord,
style: &S
) -> Result<(), DrawingErrorKind<Self::ErrorType>>
fn draw_rect<S: BackendStyle>(
&mut self,
upper_left: BackendCoord,
bottom_right: BackendCoord,
style: &S,
fill: bool
) -> Result<(), DrawingErrorKind<Self::ErrorType>>
[src]
&mut self,
upper_left: BackendCoord,
bottom_right: BackendCoord,
style: &S,
fill: bool
) -> Result<(), DrawingErrorKind<Self::ErrorType>>
fn draw_path<S: BackendStyle, I: IntoIterator<Item = BackendCoord>>(
&mut self,
path: I,
style: &S
) -> Result<(), DrawingErrorKind<Self::ErrorType>>
[src]
&mut self,
path: I,
style: &S
) -> Result<(), DrawingErrorKind<Self::ErrorType>>
fn draw_circle<S: BackendStyle>(
&mut self,
center: BackendCoord,
radius: u32,
style: &S,
fill: bool
) -> Result<(), DrawingErrorKind<Self::ErrorType>>
[src]
&mut self,
center: BackendCoord,
radius: u32,
style: &S,
fill: bool
) -> Result<(), DrawingErrorKind<Self::ErrorType>>
fn draw_text<'b>(
&mut self,
text: &str,
font: &FontDesc<'b>,
pos: BackendCoord,
color: &RGBAColor
) -> Result<(), DrawingErrorKind<Self::ErrorType>>
[src]
&mut self,
text: &str,
font: &FontDesc<'b>,
pos: BackendCoord,
color: &RGBAColor
) -> Result<(), DrawingErrorKind<Self::ErrorType>>
Auto Trait Implementations
impl !Send for CanvasBackend
impl !Sync for CanvasBackend
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,