pub struct D2DCanvas { /* private fields */ }
Trait Implementations§
Source§impl CanvasBackend for D2DCanvas
impl CanvasBackend for D2DCanvas
type DeviceContextType = D2DDeviceContext
type BitmapType = D2DBitmap
type BrushType = D2DBrush
type LayerType = D2DLayer
type MatrixType = D2DMatrix
type PathType = D2DPath
fn from_layer( context: Option<&Self::DeviceContextType>, layer: &Self::LayerType, ) -> Result<Self, GraphicsError>
fn from_window( context: Option<&Self::DeviceContextType>, window: &Window, ) -> Result<Self, GraphicsError>
fn device_context(&self) -> Option<&Self::DeviceContextType>
fn size(&self) -> FSize
fn pixel_size(&self) -> ISize
fn save(&mut self) -> bool
fn restore(&mut self) -> bool
fn begin_draw(&mut self)
fn end_draw(&mut self)
fn get_opacity(&self) -> Float
fn set_opacity(&mut self, opacity: Float)
fn get_blend_mode(&self) -> BlendMode
fn set_blend_mode(&mut self, mode: BlendMode)
fn get_draw_mode(&self) -> DrawMode
fn set_draw_mode(&mut self, mode: DrawMode)
fn get_line_dash(&self) -> (Option<Vec<Float>>, Float)
fn set_line_dash(&mut self, dashes: &[Float], offset: Float)
fn get_matrix(&self) -> Self::MatrixType
fn set_matrix(&mut self, matrix: &Self::MatrixType)
fn concat_matrix(&mut self, matrix: &Self::MatrixType)
fn get_miter_limit(&self) -> Float
fn set_miter_limit(&mut self, limit: Float)
fn get_smooth(&self) -> bool
fn set_smooth(&mut self, smooth: bool)
fn get_stroke_cap(&self) -> Cap
fn set_stroke_cap(&mut self, cap: Cap)
fn get_stroke_join(&self) -> Join
fn set_stroke_join(&mut self, join: Join)
fn get_stroke_width(&self) -> Float
fn set_stroke_width(&mut self, width: Float)
fn set_brush(&mut self, brush: &Self::BrushType)
fn get_font_family(&self) -> &str
fn set_font_family(&mut self, font_family: &str)
fn get_font_size(&self) -> Float
fn set_font_size(&mut self, font_size: Float)
fn get_font_style(&self) -> FontStyle
fn set_font_style(&mut self, font_style: FontStyle)
fn get_font_weight(&self) -> FontWeight
fn set_font_weight(&mut self, font_weight: FontWeight)
fn get_text_alignment(&self) -> TextAlignment
fn set_text_alignment(&mut self, text_alignment: TextAlignment)
fn get_text_color(&self) -> Color
fn set_text_color(&mut self, color: Color)
fn rotate(&mut self, angle: Float)
fn scale(&mut self, x: Float, y: Float)
fn translate(&mut self, x: Float, y: Float)
fn clear(&mut self, color: Color)
fn clip_to_rect(&mut self, rect: FRect)
fn clip_to_path(&mut self, path: &Self::PathType)
fn draw_line(&mut self, x1: Float, y1: Float, x2: Float, y2: Float) -> bool
fn draw_rect(&mut self, x: Float, y: Float, width: Float, height: Float) -> bool
fn draw_rounded_rect( &mut self, x: Float, y: Float, width: Float, height: Float, radius: Float, ) -> bool
fn draw_circle(&mut self, x: Float, y: Float, radius: Float) -> bool
fn draw_ellipse( &mut self, x: Float, y: Float, width: Float, height: Float, ) -> bool
fn draw_path(&mut self, path: &Self::PathType) -> bool
fn draw_bitmap( &mut self, bitmap: &Self::BitmapType, source_rect: Option<FRect>, dest_rect: FRect, ) -> bool
fn draw_layer(&mut self, layer: &Self::LayerType, dest_rect: FRect) -> bool
fn draw_text(&mut self, text: &str, rect: FRect) -> bool
fn draw_text_at(&mut self, text: &str, x: Float, y: Float) -> bool
fn fill_rect( &mut self, x: Float, y: Float, width: Float, height: Float, mask: Option<&Self::BitmapType>, ) -> bool
fn bounds(&self) -> FRect
fn map_rect(&self, rect: FRect) -> FRect
Auto Trait Implementations§
impl !Freeze for D2DCanvas
impl !RefUnwindSafe for D2DCanvas
impl Send for D2DCanvas
impl !Sync for D2DCanvas
impl Unpin for D2DCanvas
impl UnwindSafe for D2DCanvas
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