pub struct ImmutableSolidColorBrush { /* private fields */ }Expand description
Fills an area with a solid color.
Implementations§
Source§impl ImmutableSolidColorBrush
impl ImmutableSolidColorBrush
Sourcepub fn with_opacity(color: Color, opacity: f64) -> Self
pub fn with_opacity(color: Color, opacity: f64) -> Self
Creates a brush with the given color and opacity.
Sourcepub fn with_transforms(
color: Color,
opacity: f64,
transform: Option<Rc<ImmutableTransform>>,
relative_transform: Option<Rc<ImmutableTransform>>,
) -> Self
pub fn with_transforms( color: Color, opacity: f64, transform: Option<Rc<ImmutableTransform>>, relative_transform: Option<Rc<ImmutableTransform>>, ) -> Self
Creates a brush with the given color, opacity and transforms.
Sourcepub fn from_uint32(color: u32) -> Self
pub fn from_uint32(color: u32) -> Self
Creates a brush with the color given as an 0xAARRGGBB value.
Sourcepub fn from_brush(source: &dyn ISolidColorBrush) -> Self
pub fn from_brush(source: &dyn ISolidColorBrush) -> Self
Creates an immutable copy of source.
Trait Implementations§
Source§impl Clone for ImmutableSolidColorBrush
impl Clone for ImmutableSolidColorBrush
Source§impl Debug for ImmutableSolidColorBrush
impl Debug for ImmutableSolidColorBrush
Source§impl Display for ImmutableSolidColorBrush
Writes the brush’s color.
impl Display for ImmutableSolidColorBrush
Writes the brush’s color.
Source§impl IBrush for ImmutableSolidColorBrush
impl IBrush for ImmutableSolidColorBrush
Source§fn as_immutable_brush(&self) -> Option<&dyn IImmutableBrush>
fn as_immutable_brush(&self) -> Option<&dyn IImmutableBrush>
The brush viewed as
IImmutableBrush, when it is one (the is IImmutableBrush test of upstream).Source§fn transform_origin(&self) -> RelativePoint
fn transform_origin(&self) -> RelativePoint
The origin of the brush
transform.Source§fn relative_transform(&self) -> Option<Rc<dyn ITransform>>
fn relative_transform(&self) -> Option<Rc<dyn ITransform>>
The transform of the brush, relative to the bounds of the painted
area.
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
The implementing value, for downcasts to immutable brush types. For
mutable brushes use
as_object.Source§fn as_solid_color_brush(&self) -> Option<&dyn ISolidColorBrush>
fn as_solid_color_brush(&self) -> Option<&dyn ISolidColorBrush>
The brush viewed as
ISolidColorBrush, when it is one.Source§fn into_immutable_brush(self: Rc<Self>) -> Option<Rc<dyn IImmutableBrush>>
fn into_immutable_brush(self: Rc<Self>) -> Option<Rc<dyn IImmutableBrush>>
The brush as an
IImmutableBrush handle, when it is immutable.The form of the brush that is sent to the render thread, when the
type keeps one: see
SharedBrush. An
immutable brush creates it once, so its identity is stable.Source§fn equals(&self, other: &dyn IBrush) -> bool
fn equals(&self, other: &dyn IBrush) -> bool
Whether the brush equals
other. Brushes compare by reference unless
the type defines structural equality (immutable solid color brushes).Source§fn as_object(&self) -> Option<&FerroObject>
fn as_object(&self) -> Option<&FerroObject>
The object behind the brush when it is a mutable
Brush.Source§fn as_gradient_brush(&self) -> Option<&dyn IGradientBrush>
fn as_gradient_brush(&self) -> Option<&dyn IGradientBrush>
The brush viewed as
IGradientBrush, when it is one.Source§fn as_linear_gradient_brush(&self) -> Option<&dyn ILinearGradientBrush>
fn as_linear_gradient_brush(&self) -> Option<&dyn ILinearGradientBrush>
The brush viewed as
ILinearGradientBrush, when it is one.Source§fn as_radial_gradient_brush(&self) -> Option<&dyn IRadialGradientBrush>
fn as_radial_gradient_brush(&self) -> Option<&dyn IRadialGradientBrush>
The brush viewed as
IRadialGradientBrush, when it is one.Source§fn as_conic_gradient_brush(&self) -> Option<&dyn IConicGradientBrush>
fn as_conic_gradient_brush(&self) -> Option<&dyn IConicGradientBrush>
The brush viewed as
IConicGradientBrush, when it is one.Source§fn as_tile_brush(&self) -> Option<&dyn ITileBrush>
fn as_tile_brush(&self) -> Option<&dyn ITileBrush>
The brush viewed as
ITileBrush, when it is one.Source§fn as_image_brush(&self) -> Option<&dyn IImageBrush>
fn as_image_brush(&self) -> Option<&dyn IImageBrush>
The brush viewed as
IImageBrush, when it is one.Source§fn as_scene_brush(&self) -> Option<&dyn ISceneBrush>
fn as_scene_brush(&self) -> Option<&dyn ISceneBrush>
The brush viewed as
ISceneBrush, when it is one.Source§fn as_mutable_brush(&self) -> Option<&dyn IMutableBrush>
fn as_mutable_brush(&self) -> Option<&dyn IMutableBrush>
The brush viewed as
IMutableBrush, when it is one.Source§fn as_composition_render_resource(
&self,
) -> Option<&dyn ICompositionRenderResource>
fn as_composition_render_resource( &self, ) -> Option<&dyn ICompositionRenderResource>
The composition render resource behind the object, if it is a
mutable object with server-side counterparts on the compositors it
is drawn with.
Source§fn as_composition_brush(&self) -> Option<&CompositionBrush>
fn as_composition_brush(&self) -> Option<&CompositionBrush>
The brush as a composition brush, when it is one (the
is CompositionBrush test of upstream).impl IImmutableBrush for ImmutableSolidColorBrush
impl IImmutableSolidColorBrush for ImmutableSolidColorBrush
Source§impl MarkupTyped for ImmutableSolidColorBrush
impl MarkupTyped for ImmutableSolidColorBrush
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
The markup metadata of the type.
Source§impl PartialEq for ImmutableSolidColorBrush
Brushes are equal when their color and opacity are equal and they share
the same transform instances.
impl PartialEq for ImmutableSolidColorBrush
Brushes are equal when their color and opacity are equal and they share the same transform instances.
Auto Trait Implementations§
impl !Freeze for ImmutableSolidColorBrush
impl !RefUnwindSafe for ImmutableSolidColorBrush
impl !Send for ImmutableSolidColorBrush
impl !Sync for ImmutableSolidColorBrush
impl !UnwindSafe for ImmutableSolidColorBrush
impl Unpin for ImmutableSolidColorBrush
impl UnsafeUnpin for ImmutableSolidColorBrush
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more