Struct piet_direct2d::d2d::D2DFactory
source · pub struct D2DFactory(_);
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 RefUnwindSafe for D2DFactory
impl !Sync for D2DFactory
impl Unpin for D2DFactory
impl UnwindSafe for D2DFactory
Blanket Implementations§
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.