pub struct DimOutside {
pub shape: MaskShape,
pub strength: DimStrength,
}Expand description
Renderer data for a dim-outside composition.
Fields§
§shape: MaskShapeThe focus region — pixels inside stay clear, pixels outside get the overlay applied.
strength: DimStrengthHow strong the surrounding dim is.
Implementations§
Source§impl DimOutside
impl DimOutside
Sourcepub fn rect(rect: Rect) -> Self
pub fn rect(rect: Rect) -> Self
Convenience constructor: rectangle focus region, default (Medium) dim.
Sourcepub fn rounded_rect(rect: Rect, radius: f32) -> Self
pub fn rounded_rect(rect: Rect, radius: f32) -> Self
Convenience constructor: rounded-rect focus region, default (Medium) dim.
Sourcepub fn with_strength(self, strength: DimStrength) -> Self
pub fn with_strength(self, strength: DimStrength) -> Self
Builder-style override of the strength.
Trait Implementations§
Source§impl Clone for DimOutside
impl Clone for DimOutside
Source§fn clone(&self) -> DimOutside
fn clone(&self) -> DimOutside
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DimOutside
impl Debug for DimOutside
Source§impl PartialEq for DimOutside
impl PartialEq for DimOutside
Source§fn eq(&self, other: &DimOutside) -> bool
fn eq(&self, other: &DimOutside) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for DimOutside
impl StructuralPartialEq for DimOutside
Auto Trait Implementations§
impl Freeze for DimOutside
impl RefUnwindSafe for DimOutside
impl Send for DimOutside
impl Sync for DimOutside
impl Unpin for DimOutside
impl UnsafeUnpin for DimOutside
impl UnwindSafe for DimOutside
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more