pub struct Factory { /* private fields */ }
Implementations
sourceimpl Factory
impl Factory
pub fn create_gradient_stop_collection<U>(
&self,
stops: &[U]
) -> Result<GradientStopCollection> where
U: Into<GradientStop> + Clone,
pub fn create_solid_color_brush(&self, color: impl Into<Rgba>) -> Result<Brush>
pub fn create_linear_gradient_brush(
&self,
start: impl Into<Point>,
end: impl Into<Point>,
stop_collection: &GradientStopCollection
) -> Result<Brush>
pub fn create_radial_gradient_brush(
&self,
center: impl Into<Point>,
offset: impl Into<Point>,
radius: impl Into<Vector>,
stop_collection: &GradientStopCollection
) -> Result<Brush>
pub fn create_path(&self) -> PathBuilder
pub fn create_stroke_style(
&self,
props: &StrokeStyleProperties<'_>
) -> Result<StrokeStyle>
pub fn create_text_format(
&self,
font: Font<'_, '_>,
size: impl Into<f32>,
style: Option<&TextStyle>
) -> Result<TextFormat>
pub fn create_text_layout(
&self,
text: impl AsRef<str>,
format: &TextFormat,
alignment: TextAlignment,
size: Option<Size>
) -> Result<TextLayout>
pub fn create_image(&self, loader: impl ImageLoader) -> Result<Image>
Trait Implementations
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more