pub struct Canvas {
pub width: f32,
pub height: f32,
pub x: f32,
pub y: f32,
pub components: Rc<RefCell<Vec<Component>>>,
pub margin: Box,
}Fields§
§width: f32§height: f32§x: f32§y: f32§components: Rc<RefCell<Vec<Component>>>§margin: BoxImplementations§
source§impl Canvas
impl Canvas
pub fn new(width: f32, height: f32) -> Self
pub fn new_width_xy(width: f32, height: f32, x: f32, y: f32) -> Self
pub fn width(&self) -> f32
pub fn height(&self) -> f32
pub fn child(&self, margin: Box) -> Self
pub fn arrow(&mut self, arrow: Arrow) -> Box
pub fn line(&mut self, line: Line) -> Box
pub fn rect(&mut self, rect: Rect) -> Box
pub fn polyline(&mut self, polyline: Polyline) -> Box
pub fn circle(&mut self, circle: Circle) -> Box
pub fn polygon(&mut self, polygon: Polygon) -> Box
pub fn text(&mut self, text: Text) -> Box
pub fn pie(&mut self, pie: Pie) -> Box
pub fn smooth_line(&mut self, line: SmoothLine) -> Box
pub fn straight_line(&mut self, line: StraightLine) -> Box
pub fn smooth_line_fill(&mut self, fill: SmoothLineFill) -> Box
pub fn straight_line_fill(&mut self, fill: StraightLineFill) -> Box
pub fn grid(&mut self, grip: Grid) -> Box
pub fn axis(&mut self, axis: Axis) -> Box
pub fn legend(&mut self, legend: Legend) -> Box
pub fn bubble(&mut self, bubble: Bubble) -> Box
pub fn append(&mut self, component: Component)
pub fn svg(&self) -> Result<String>
Auto Trait Implementations§
impl !RefUnwindSafe for Canvas
impl !Send for Canvas
impl !Sync for Canvas
impl Unpin for Canvas
impl !UnwindSafe for Canvas
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