[−][src]Enum druid::widget::BackgroundBrush
Something that can be used as the background for a widget.
This represents anything that can be painted inside a widgets paint
method; that is, it may have access to the Data
and the Env
.
Variants (Non-exhaustive)
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Color(Color)
Linear(LinearGradient)
Radial(RadialGradient)
Fixed(FixedGradient)
Painter(Painter<T>)
Implementations
impl<T: Data> BackgroundBrush<T>
[src]
pub fn paint(&mut self, ctx: &mut PaintCtx<'_, '_, '_>, data: &T, env: &Env)
[src]
Draw this BackgroundBrush
into a provided PaintCtx
.
Trait Implementations
impl<T> From<Color> for BackgroundBrush<T>
[src]
pub fn from(src: Color) -> BackgroundBrush<T>
[src]
impl<T> From<FixedGradient> for BackgroundBrush<T>
[src]
pub fn from(src: FixedGradient) -> BackgroundBrush<T>
[src]
impl<T> From<Key<Color>> for BackgroundBrush<T>
[src]
pub fn from(src: Key<Color>) -> BackgroundBrush<T>
[src]
impl<T> From<LinearGradient> for BackgroundBrush<T>
[src]
pub fn from(src: LinearGradient) -> BackgroundBrush<T>
[src]
impl<T> From<PaintBrush> for BackgroundBrush<T>
[src]
pub fn from(src: PaintBrush) -> BackgroundBrush<T>
[src]
impl<T> From<Painter<T>> for BackgroundBrush<T>
[src]
pub fn from(src: Painter<T>) -> BackgroundBrush<T>
[src]
impl<T> From<RadialGradient> for BackgroundBrush<T>
[src]
pub fn from(src: RadialGradient) -> BackgroundBrush<T>
[src]
Auto Trait Implementations
impl<T> !RefUnwindSafe for BackgroundBrush<T>
[src]
impl<T> !Send for BackgroundBrush<T>
[src]
impl<T> !Sync for BackgroundBrush<T>
[src]
impl<T> Unpin for BackgroundBrush<T>
[src]
impl<T> !UnwindSafe for BackgroundBrush<T>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> RoundFrom<T> for T
pub fn round_from(x: T) -> T
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
U: RoundFrom<T>,
pub fn round_into(self) -> U
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,