Skip to main content

Paint

Struct Paint 

Source
pub struct Paint { /* private fields */ }

Trait Implementations§

Source§

impl Clone for Paint

Source§

fn clone(&self) -> Paint

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Paint

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Paint for Paint

Source§

type ColorSourceFragment = ColorSourceFragment

Source§

type ImageFilterFragment = ImageFilterFragment

Source§

type Texture = ImpellerTexture

Source§

fn set_color(&mut self, color: impl Into<Color>)

Sets the paint color for stroking or filling.
Source§

fn set_blend_mode(&mut self, blend_mode: BlendMode)

Sets the paint blend mode.
Source§

fn set_draw_style(&mut self, draw_style: DrawStyle)

Set the paint draw style.
Source§

fn set_stroke_cap(&mut self, cap: StrokeCap)

Sets how strokes rendered using this paint are capped.
Source§

fn set_stroke_join(&mut self, join: StrokeJoin)

Sets how strokes rendered using this paint are joined.
Source§

fn set_stroke_width(&mut self, width: f32)

Sets the width of the strokes rendered using this paint.
Source§

fn set_stroke_miter(&mut self, miter: f32)

Sets the miter limit of the strokes rendered using this paint.
Source§

fn set_color_source( &mut self, color_source: ColorSource<Self::Texture, ColorSourceFragment>, )

Sets the color source of the paint.
Source§

fn set_color_filter(&mut self, color_filter: ColorFilter)

Sets the color filter of the paint.
Source§

fn set_image_filter(&mut self, image_filter: ImageFilter<ImageFilterFragment>)

Sets the image filter of a paint. Read more
Source§

fn set_mask_filter(&mut self, mask_filter: MaskFilter)

Sets the mask filter of a paint. Read more
Source§

fn color(color: impl Into<Color>) -> Self

Source§

fn stroke_color(color: impl Into<Color>, stroke_width: f32) -> Self

Source§

fn color_source( color_source: ColorSource<Self::Texture, Self::ColorSourceFragment>, ) -> Self

Source§

fn with_color(self, color: impl Into<Color>) -> Self

Source§

fn with_blend_mode(self, blend_mode: BlendMode) -> Self

Source§

fn with_draw_style(self, draw_style: DrawStyle) -> Self

Source§

fn with_stroke_cap(self, cap: StrokeCap) -> Self

Source§

fn with_stroke_join(self, join: StrokeJoin) -> Self

Source§

fn with_stroke_width(self, width: f32) -> Self

Source§

fn with_stroke_miter(self, miter: f32) -> Self

Source§

fn with_color_source( self, color_source: ColorSource<Self::Texture, Self::ColorSourceFragment>, ) -> Self

Source§

fn with_color_filter(self, color_filter: ColorFilter) -> Self

Source§

fn with_image_filter( self, image_filter: ImageFilter<Self::ImageFilterFragment>, ) -> Self

Source§

fn with_mask_filter(self, mask_filter: MaskFilter) -> Self

Auto Trait Implementations§

§

impl Freeze for Paint

§

impl RefUnwindSafe for Paint

§

impl Send for Paint

§

impl Sync for Paint

§

impl Unpin for Paint

§

impl UnsafeUnpin for Paint

§

impl UnwindSafe for Paint

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P> PaintObject for P
where P: Paint,

Source§

fn set_color(&mut self, color: Color)

Sets the paint color for stroking or filling.
Source§

fn with_color(self: Box<P>, color: Color) -> Box<dyn PaintObject>

Source§

fn set_blend_mode(&mut self, blend_mode: BlendMode)

Sets the paint blend mode.
Source§

fn with_blend_mode(self: Box<P>, blend_mode: BlendMode) -> Box<dyn PaintObject>

Source§

fn set_draw_style(&mut self, draw_style: DrawStyle)

Set the paint draw style.
Source§

fn with_draw_style(self: Box<P>, draw_style: DrawStyle) -> Box<dyn PaintObject>

Source§

fn set_stroke_cap(&mut self, cap: StrokeCap)

Sets how strokes rendered using this paint are capped.
Source§

fn with_stroke_cap(self: Box<P>, cap: StrokeCap) -> Box<dyn PaintObject>

Source§

fn set_stroke_join(&mut self, join: StrokeJoin)

Sets how strokes rendered using this paint are joined.
Source§

fn with_stroke_join(self: Box<P>, join: StrokeJoin) -> Box<dyn PaintObject>

Source§

fn set_stroke_width(&mut self, width: f32)

Sets the width of the strokes rendered using this paint.
Source§

fn with_stroke_width(self: Box<P>, width: f32) -> Box<dyn PaintObject>

Source§

fn set_stroke_miter(&mut self, miter: f32)

Sets the miter limit of the strokes rendered using this paint.
Source§

fn with_stroke_miter(self: Box<P>, miter: f32) -> Box<dyn PaintObject>

Source§

fn set_color_source( &mut self, color_source: ColorSource<Arc<dyn TextureObject>, Box<dyn ColorSourceFragmentObject>>, )

Sets the color source of the paint.
Source§

fn with_color_source( self: Box<P>, color_source: ColorSource<Arc<dyn TextureObject>, Box<dyn ColorSourceFragmentObject>>, ) -> Box<dyn PaintObject>

Source§

fn set_color_filter(&mut self, color_filter: ColorFilter)

Sets the color filter of the paint.
Source§

fn with_color_filter( self: Box<P>, color_filter: ColorFilter, ) -> Box<dyn PaintObject>

Source§

fn set_image_filter( &mut self, image_filter: ImageFilter<Box<dyn ImageFilterFragmentObject>>, )

Sets the image filter of a paint. Read more
Source§

fn with_image_filter( self: Box<P>, image_filter: ImageFilter<Box<dyn ImageFilterFragmentObject>>, ) -> Box<dyn PaintObject>

Source§

fn set_mask_filter(&mut self, mask_filter: MaskFilter)

Sets the mask filter of a paint. Read more
Source§

fn with_mask_filter( self: Box<P>, mask_filter: MaskFilter, ) -> Box<dyn PaintObject>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.