Struct D2DCanvas

Source
pub struct D2DCanvas { /* private fields */ }

Trait Implementations§

Source§

impl CanvasBackend for D2DCanvas

Source§

type DeviceContextType = D2DDeviceContext

Source§

type BitmapType = D2DBitmap

Source§

type BrushType = D2DBrush

Source§

type LayerType = D2DLayer

Source§

type MatrixType = D2DMatrix

Source§

type PathType = D2DPath

Source§

fn from_layer( context: Option<&Self::DeviceContextType>, layer: &Self::LayerType, ) -> Result<Self, GraphicsError>

Source§

fn from_window( context: Option<&Self::DeviceContextType>, window: &Window, ) -> Result<Self, GraphicsError>

Source§

fn device_context(&self) -> Option<&Self::DeviceContextType>

Source§

fn size(&self) -> FSize

Source§

fn pixel_size(&self) -> ISize

Source§

fn save(&mut self) -> bool

Source§

fn restore(&mut self) -> bool

Source§

fn begin_draw(&mut self)

Source§

fn end_draw(&mut self)

Source§

fn get_opacity(&self) -> Float

Source§

fn set_opacity(&mut self, opacity: Float)

Source§

fn get_blend_mode(&self) -> BlendMode

Source§

fn set_blend_mode(&mut self, mode: BlendMode)

Source§

fn get_draw_mode(&self) -> DrawMode

Source§

fn set_draw_mode(&mut self, mode: DrawMode)

Source§

fn get_line_dash(&self) -> (Option<Vec<Float>>, Float)

Source§

fn set_line_dash(&mut self, dashes: &[Float], offset: Float)

Source§

fn get_matrix(&self) -> Self::MatrixType

Source§

fn set_matrix(&mut self, matrix: &Self::MatrixType)

Source§

fn concat_matrix(&mut self, matrix: &Self::MatrixType)

Source§

fn get_miter_limit(&self) -> Float

Source§

fn set_miter_limit(&mut self, limit: Float)

Source§

fn get_smooth(&self) -> bool

Source§

fn set_smooth(&mut self, smooth: bool)

Source§

fn get_stroke_cap(&self) -> Cap

Source§

fn set_stroke_cap(&mut self, cap: Cap)

Source§

fn get_stroke_join(&self) -> Join

Source§

fn set_stroke_join(&mut self, join: Join)

Source§

fn get_stroke_width(&self) -> Float

Source§

fn set_stroke_width(&mut self, width: Float)

Source§

fn set_brush(&mut self, brush: &Self::BrushType)

Source§

fn get_font_family(&self) -> &str

Source§

fn set_font_family(&mut self, font_family: &str)

Source§

fn get_font_size(&self) -> Float

Source§

fn set_font_size(&mut self, font_size: Float)

Source§

fn get_font_style(&self) -> FontStyle

Source§

fn set_font_style(&mut self, font_style: FontStyle)

Source§

fn get_font_weight(&self) -> FontWeight

Source§

fn set_font_weight(&mut self, font_weight: FontWeight)

Source§

fn get_text_alignment(&self) -> TextAlignment

Source§

fn set_text_alignment(&mut self, text_alignment: TextAlignment)

Source§

fn get_text_color(&self) -> Color

Source§

fn set_text_color(&mut self, color: Color)

Source§

fn rotate(&mut self, angle: Float)

Source§

fn scale(&mut self, x: Float, y: Float)

Source§

fn translate(&mut self, x: Float, y: Float)

Source§

fn clear(&mut self, color: Color)

Source§

fn clip_to_rect(&mut self, rect: FRect)

Source§

fn clip_to_path(&mut self, path: &Self::PathType)

Source§

fn draw_line(&mut self, x1: Float, y1: Float, x2: Float, y2: Float) -> bool

Source§

fn draw_rect(&mut self, x: Float, y: Float, width: Float, height: Float) -> bool

Source§

fn draw_rounded_rect( &mut self, x: Float, y: Float, width: Float, height: Float, radius: Float, ) -> bool

Source§

fn draw_circle(&mut self, x: Float, y: Float, radius: Float) -> bool

Source§

fn draw_ellipse( &mut self, x: Float, y: Float, width: Float, height: Float, ) -> bool

Source§

fn draw_path(&mut self, path: &Self::PathType) -> bool

Source§

fn draw_bitmap( &mut self, bitmap: &Self::BitmapType, source_rect: Option<FRect>, dest_rect: FRect, ) -> bool

Source§

fn draw_layer(&mut self, layer: &Self::LayerType, dest_rect: FRect) -> bool

Source§

fn draw_text(&mut self, text: &str, rect: FRect) -> bool

Source§

fn draw_text_at(&mut self, text: &str, x: Float, y: Float) -> bool

Source§

fn fill_rect( &mut self, x: Float, y: Float, width: Float, height: Float, mask: Option<&Self::BitmapType>, ) -> bool

Source§

fn bounds(&self) -> FRect

Source§

fn map_rect(&self, rect: FRect) -> FRect

Source§

impl Clone for D2DCanvas

Source§

fn clone(&self) -> D2DCanvas

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for D2DCanvas

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more