pub struct Canvas { /* private fields */ }Implementations§
Source§impl Canvas
impl Canvas
pub fn new(size: Size) -> Self
pub fn size(&self) -> Size
pub fn clear(&mut self, color: Color)
pub fn rect(&mut self, rect: Rect, color: Color)
pub fn round_rect(&mut self, rect: Rect, radius: f32, color: Color)
pub fn line(&mut self, start: Point, end: Point, stroke: Stroke, color: Color)
pub fn circle(&mut self, center: Point, radius: f32, color: Color)
pub fn text( &mut self, position: Point, text: impl Into<String>, style: TextStyle, color: Color, )
pub fn image_placeholder(&mut self, rect: Rect, color: Color)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Canvas
impl RefUnwindSafe for Canvas
impl Send for Canvas
impl Sync for Canvas
impl Unpin for Canvas
impl UnsafeUnpin 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