pub struct Device { /* private fields */ }
Expand description
A struct that can be used to create bitmap render contexts.
Implementations§
Source§impl Device
impl Device
Sourcepub fn new() -> Result<Device, Error>
pub fn new() -> Result<Device, Error>
Create a new device.
This creates new Direct2D and DirectWrite factories, a Direct3D device, and a Direct2D device.
Sourcepub fn bitmap_target(
&mut self,
width: usize,
height: usize,
pix_scale: f64,
) -> Result<BitmapTarget<'_>, Error>
pub fn bitmap_target( &mut self, width: usize, height: usize, pix_scale: f64, ) -> Result<BitmapTarget<'_>, Error>
Create a new bitmap target.
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl !Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
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
Source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.