pub struct D2DFactory(/* private fields */);Expand description
A Direct2D factory object.
This struct is public only to use for system integration in piet_common and druid-shell. It is not intended that end-users directly use this struct.
Implementations§
Source§impl D2DFactory
impl D2DFactory
Sourcepub fn new() -> Result<D2DFactory, Error>
pub fn new() -> Result<D2DFactory, Error>
Create a new Direct2D factory.
This requires Windows 7 platform update, and can also fail if resources are unavailable.
Sourcepub unsafe fn create_device(
&self,
dxgi_device: *mut IDXGIDevice,
) -> Result<D2DDevice, Error>
pub unsafe fn create_device( &self, dxgi_device: *mut IDXGIDevice, ) -> Result<D2DDevice, Error>
Sourcepub fn get_raw(&self) -> *mut ID2D1Factory1
pub fn get_raw(&self) -> *mut ID2D1Factory1
Get the raw pointer
pub fn create_path_geometry(&self) -> Result<PathGeometry, Error>
pub fn create_rect_geometry( &self, rect: Rect, ) -> Result<RectangleGeometry, Error>
pub fn create_round_rect_geometry( &self, rect: Rect, radius: f64, ) -> Result<RoundedRectangleGeometry, Error>
pub fn create_circle_geometry( &self, circle: Circle, ) -> Result<EllipseGeometry, Error>
pub fn create_stroke_style( &self, props: &D2D1_STROKE_STYLE_PROPERTIES, dashes: Option<&[f32]>, ) -> Result<StrokeStyle, Error>
Trait Implementations§
impl Send for D2DFactory
Auto Trait Implementations§
impl Freeze for D2DFactory
impl RefUnwindSafe for D2DFactory
impl !Sync for D2DFactory
impl Unpin for D2DFactory
impl UnwindSafe for D2DFactory
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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.