pub struct DrawingContext { /* private fields */ }Available on Windows only.
Implementations§
Source§impl DrawingContext
impl DrawingContext
pub fn new( d2d: ID2D1Factory, dwrite: IDWriteFactory, target: ID2D1RenderTarget, ) -> Self
pub fn render_target(&self) -> &ID2D1RenderTarget
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: &DrawingImage, rect: Rect, clip: Option<Rect>, ) -> Result<()>
pub fn create_path_builder(&self, start: Point) -> Result<DrawingPathBuilder>
Auto Trait Implementations§
impl Freeze for DrawingContext
impl RefUnwindSafe for DrawingContext
impl Send for DrawingContext
impl Sync for DrawingContext
impl Unpin for DrawingContext
impl UnsafeUnpin for DrawingContext
impl UnwindSafe for DrawingContext
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