pub struct GraphicsContext { /* private fields */ }Implementations§
Source§impl GraphicsContext
impl GraphicsContext
pub fn new() -> Self
pub fn move_to(&mut self, x: f64, y: f64) -> &mut Self
pub fn line_to(&mut self, x: f64, y: f64) -> &mut Self
pub fn curve_to( &mut self, x1: f64, y1: f64, x2: f64, y2: f64, x3: f64, y3: f64, ) -> &mut Self
pub fn rect(&mut self, x: f64, y: f64, width: f64, height: f64) -> &mut Self
pub fn circle(&mut self, cx: f64, cy: f64, radius: f64) -> &mut Self
pub fn close_path(&mut self) -> &mut Self
pub fn stroke(&mut self) -> &mut Self
pub fn fill(&mut self) -> &mut Self
pub fn fill_stroke(&mut self) -> &mut Self
pub fn set_stroke_color(&mut self, color: Color) -> &mut Self
pub fn set_fill_color(&mut self, color: Color) -> &mut Self
pub fn set_line_width(&mut self, width: f64) -> &mut Self
pub fn set_line_cap(&mut self, cap: LineCap) -> &mut Self
pub fn set_line_join(&mut self, join: LineJoin) -> &mut Self
pub fn save_state(&mut self) -> &mut Self
pub fn restore_state(&mut self) -> &mut Self
pub fn translate(&mut self, tx: f64, ty: f64) -> &mut Self
pub fn scale(&mut self, sx: f64, sy: f64) -> &mut Self
pub fn rotate(&mut self, angle: f64) -> &mut Self
pub fn transform( &mut self, a: f64, b: f64, c: f64, d: f64, e: f64, f: f64, ) -> &mut Self
pub fn rectangle( &mut self, x: f64, y: f64, width: f64, height: f64, ) -> &mut Self
pub fn draw_image( &mut self, image_name: &str, x: f64, y: f64, width: f64, height: f64, ) -> &mut Self
Trait Implementations§
Source§impl Clone for GraphicsContext
impl Clone for GraphicsContext
Source§fn clone(&self) -> GraphicsContext
fn clone(&self) -> GraphicsContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GraphicsContext
impl RefUnwindSafe for GraphicsContext
impl Send for GraphicsContext
impl Sync for GraphicsContext
impl Unpin for GraphicsContext
impl UnwindSafe for GraphicsContext
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