SolidColorBrush
struct · ferroui-base · v0.5.0
struct SolidColorBrush
Fills an area with a solid color.
Members
TYPEto_refcolor_propertyconstructnewwith_colorwith_color_and_opacityfrom_uint32colorset_colorparseto_immutable
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<SolidColorBrush>
Returns a strong reference to this object.
color_property
fn color_property() -> &'static StyledProperty<Color>
construct
fn construct() -> Self
Creates the class data.
new
fn new() -> Ref<Self>
with_color
fn with_color(color: Color) -> Ref<Self>
Creates a brush with the given color.
with_color_and_opacity
fn with_color_and_opacity(color: Color, opacity: f64) -> Ref<Self>
Creates a brush with the given color and opacity.
from_uint32
fn from_uint32(color: u32) -> Ref<Self>
Creates a brush with the color given as an 0xAARRGGBB value.
color
fn color(self: &Self) -> Color
The color of the brush.
set_color
fn set_color(self: &Self, value: Color)
parse
fn parse(s: &str) -> Result<Ref<SolidColorBrush>, FormatError>
Parses a brush string.
to_immutable
fn to_immutable(self: &Self) -> Rc<dyn IImmutableBrush>
Creates an immutable clone of the brush.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBrushImplExtFerroObjectImplExtClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyToStringErasedDestructorIntoEitherDerefUpcast<T>Upcast<SolidColorBrush>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImplBrushImplDisplay
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.