Skip to main content

PaintStyle

Struct PaintStyle 

Source
pub struct PaintStyle { /* private fields */ }
Expand description

Paint-only visual properties decoupled from layout calculation.

Implementations§

Source§

impl PaintStyle

Non-panicking optional field readers for PaintStyle.

Source

pub fn background_color(&self) -> Option<Color>

Returns the optional background color.

§Arguments
  • &Self - Paint style.
§Returns
  • Option<Color> - Background color if set.
Source

pub fn background_gradient(&self) -> Option<LinearGradient>

Returns the optional linear gradient fill.

§Arguments
  • &Self - Paint style.
§Returns
  • Option<LinearGradient> - Linear gradient if set.
Source

pub fn box_shadow(&self) -> Option<Shadow>

Returns the optional drop shadow.

§Arguments
  • &Self - Paint style.
§Returns
  • Option<Shadow> - Drop shadow if set.
Source

pub fn focus_ring_border(&self) -> Option<Border>

Returns the optional focus ring stroke.

§Arguments
  • &Self - Paint style.
§Returns
  • Option<Border> - Focus ring stroke if set.
Source§

impl PaintStyle

Source

pub fn get_mut_background(&mut self) -> &mut Option<Color>

Source

pub fn set_background(&mut self, val: Option<Color>) -> &mut Self

Source

pub fn get_mut_gradient(&mut self) -> &mut Option<LinearGradient>

Source

pub fn set_gradient(&mut self, val: Option<LinearGradient>) -> &mut Self

Source

pub fn get_border(&self) -> Border

Source

pub fn get_mut_border(&mut self) -> &mut Border

Source

pub fn set_border(&mut self, val: Border) -> &mut Self

Source

pub fn get_radius(&self) -> CornerRadius

Source

pub fn get_mut_radius(&mut self) -> &mut CornerRadius

Source

pub fn set_radius(&mut self, val: CornerRadius) -> &mut Self

Source

pub fn get_mut_shadow(&mut self) -> &mut Option<Shadow>

Source

pub fn set_shadow(&mut self, val: Option<Shadow>) -> &mut Self

Source

pub fn get_mut_focus_ring(&mut self) -> &mut Option<Border>

Source

pub fn set_focus_ring(&mut self, val: Option<Border>) -> &mut Self

Source

pub fn get_opacity(&self) -> f32

Source

pub fn get_mut_opacity(&mut self) -> &mut f32

Source

pub fn set_opacity(&mut self, val: f32) -> &mut Self

Source

pub fn get_transform(&self) -> Transform2D

Source

pub fn get_mut_transform(&mut self) -> &mut Transform2D

Source

pub fn set_transform(&mut self, val: Transform2D) -> &mut Self

Source

pub fn get_cursor(&self) -> CursorIcon

Source

pub fn get_mut_cursor(&mut self) -> &mut CursorIcon

Source

pub fn set_cursor(&mut self, val: CursorIcon) -> &mut Self

Source

pub fn get_pointer_events(&self) -> PointerEvents

Source

pub fn get_mut_pointer_events(&mut self) -> &mut PointerEvents

Source

pub fn set_pointer_events(&mut self, val: PointerEvents) -> &mut Self

Source

pub fn get_stop_scroll_propagation(&self) -> bool

Source

pub fn get_mut_stop_scroll_propagation(&mut self) -> &mut bool

Source

pub fn set_stop_scroll_propagation(&mut self, val: bool) -> &mut Self

Source

pub fn get_stop_event_propagation(&self) -> bool

Source

pub fn get_mut_stop_event_propagation(&mut self) -> &mut bool

Source

pub fn set_stop_event_propagation(&mut self, val: bool) -> &mut Self

Trait Implementations§

Source§

impl Clone for PaintStyle

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for PaintStyle

Source§

impl Debug for PaintStyle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PaintStyle

Default paint properties (opacity = 1.0, transparent background).

Source§

fn default() -> Self

Creates default transparent paint properties.

§Returns
  • Self - Default PaintStyle.
Source§

impl PartialEq for PaintStyle

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PaintStyle

Auto Trait Implementations§

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<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 = !

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

fn try_from(value: U) -> Result<T, !>

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.