pub struct DrawingContext<'a> { /* private fields */ }Available on macOS only.
Implementations§
Source§impl DrawingContext<'_>
impl DrawingContext<'_>
pub fn close(self) -> Result<()>
pub fn set_transform(&mut self, transform: Transform) -> Result<()>
pub fn transform(&self) -> Result<Transform>
pub fn draw_path(&mut self, pen: impl Pen, path: &DrawingPath) -> Result<()>
pub fn fill_path(&mut self, brush: impl Brush, path: &DrawingPath) -> Result<()>
pub fn draw_arc( &mut self, pen: impl Pen, rect: Rect, start: f64, end: f64, ) -> Result<()>
pub fn draw_pie( &mut self, pen: impl Pen, rect: Rect, start: f64, end: f64, ) -> Result<()>
pub fn fill_pie( &mut self, brush: impl Brush, rect: Rect, start: f64, end: f64, ) -> Result<()>
pub fn draw_ellipse(&mut self, pen: impl Pen, rect: Rect) -> Result<()>
pub fn fill_ellipse(&mut self, brush: impl Brush, rect: Rect) -> Result<()>
pub fn draw_line( &mut self, pen: impl Pen, start: Point, end: Point, ) -> Result<()>
pub fn draw_rect(&mut self, pen: impl Pen, rect: Rect) -> Result<()>
pub fn fill_rect(&mut self, brush: impl Brush, rect: Rect) -> Result<()>
pub fn draw_round_rect( &mut self, pen: impl Pen, rect: Rect, round: Size, ) -> Result<()>
pub fn fill_round_rect( &mut self, brush: impl Brush, rect: Rect, round: Size, ) -> Result<()>
pub fn draw_str( &mut self, brush: impl Brush, font: DrawingFont, pos: Point, text: &str, ) -> Result<()>
pub fn measure_str(&self, font: DrawingFont, text: &str) -> Result<Size>
pub fn create_image(&self, image: DynamicImage) -> Result<DrawingImage>
pub fn draw_image( &mut self, image_rep: &DrawingImage, rect: Rect, clip: Option<Rect>, ) -> Result<()>
pub fn create_path_builder(&self, start: Point) -> Result<DrawingPathBuilder>
Trait Implementations§
Source§impl Drop for DrawingContext<'_>
impl Drop for DrawingContext<'_>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for DrawingContext<'a>
impl<'a> !Send for DrawingContext<'a>
impl<'a> !Sync for DrawingContext<'a>
impl<'a> !UnwindSafe for DrawingContext<'a>
impl<'a> Freeze for DrawingContext<'a>
impl<'a> Unpin for DrawingContext<'a>
impl<'a> UnsafeUnpin for DrawingContext<'a>
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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