Struct piet_common::Device
source · pub struct Device { /* private fields */ }Expand description
A struct that can be used to create bitmap render contexts.
Implementations
sourceimpl 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 RefUnwindSafe for Device
impl Send for Device
impl !Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
sourcefn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
sourceimpl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
sourcefn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.