pub struct CompositionGradientBrush(/* private fields */);Expand description
The base of the composition gradient brushes: the gradient stops and the spread method.
Implementations§
Source§impl CompositionGradientBrush
impl CompositionGradientBrush
Sourcepub fn from_brush(
brush: &Rc<CompositionBrush>,
) -> Option<CompositionGradientBrush>
pub fn from_brush( brush: &Rc<CompositionBrush>, ) -> Option<CompositionGradientBrush>
The handle of brush as a gradient brush, if it is one.
Sourcepub fn gradient_stops(&self) -> FerroList<Rc<dyn IGradientStop>>
pub fn gradient_stops(&self) -> FerroList<Rc<dyn IGradientStop>>
The gradient stops. Mutations of the list itself are not tracked - assign
the property to ship in-place edits made after a commit. Stops created via
Compositor::create_gradient_stop_with stay live
on the server and animate individually; other stops are snapshotted at
serialization time.
pub fn set_gradient_stops(&self, value: FerroList<Rc<dyn IGradientStop>>)
Sourcepub fn spread_method(&self) -> GradientSpreadMethod
pub fn spread_method(&self) -> GradientSpreadMethod
How the gradient repeats outside the stop range.
pub fn set_spread_method(&self, value: GradientSpreadMethod)
Source§impl CompositionGradientBrush
impl CompositionGradientBrush
Sourcepub fn anchor_point(&self) -> Vector
pub fn anchor_point(&self) -> Vector
The point of the gradient, relative to the size of the painted area,
that is placed at offset (animatable as AnchorPoint).
pub fn set_anchor_point(&self, value: Vector)
Sourcepub fn center_point(&self) -> Vector
pub fn center_point(&self) -> Vector
The point the gradient is scaled and rotated about, in the
coordinates of the painted area (animatable as CenterPoint).
pub fn set_center_point(&self, value: Vector)
pub fn set_offset(&self, value: Vector)
Sourcepub fn rotation_angle(&self) -> f32
pub fn rotation_angle(&self) -> f32
The rotation of the gradient about its centre point, in radians
(animatable as RotationAngle).
pub fn set_rotation_angle(&self, value: f32)
Sourcepub fn scale(&self) -> Vector
pub fn scale(&self) -> Vector
The scale of the gradient about its centre point (default (1, 1);
animatable as Scale).
pub fn set_scale(&self, value: Vector)
Sourcepub fn transform_matrix(&self) -> Matrix
pub fn transform_matrix(&self) -> Matrix
The transform matrix of the gradient (WinUI Matrix3x2; animatable
as TransformMatrix).
pub fn set_transform_matrix(&self, value: Matrix)
Source§impl CompositionGradientBrush
impl CompositionGradientBrush
Sourcepub fn rotation_angle_in_degrees(&self) -> f32
pub fn rotation_angle_in_degrees(&self) -> f32
The rotation in degrees: a view of
rotation_angle (not an animation target).
pub fn set_rotation_angle_in_degrees(&self, value: f32)
Sourcepub fn extend_mode(&self) -> CompositionGradientExtendMode
pub fn extend_mode(&self) -> CompositionGradientExtendMode
How the gradient continues outside its stops: a view of
spread_method (Clamp is Pad, Wrap is
Repeat, Mirror is Reflect).
pub fn set_extend_mode(&self, value: CompositionGradientExtendMode)
Sourcepub fn interpolation_space(&self) -> CompositionColorSpace
pub fn interpolation_space(&self) -> CompositionColorSpace
The colour space the stops are interpolated in.
Deviation (winui-composition.md): stored only; the drawing contexts interpolate in RGB.
pub fn set_interpolation_space(&self, value: CompositionColorSpace)
Sourcepub fn mapping_mode(&self) -> CompositionMappingMode
pub fn mapping_mode(&self) -> CompositionMappingMode
How the points of the WinUI members are measured (default
Relative). Changing it keeps the numbers of the points and changes
their unit, as WinUI reads the same numbers in the new mode.
pub fn set_mapping_mode(&self, value: CompositionMappingMode)
Sourcepub fn color_stops(&self) -> FerroList<Rc<dyn IGradientStop>>
pub fn color_stops(&self) -> FerroList<Rc<dyn IGradientStop>>
ColorStops: the WinUI name of
gradient_stops, with the same rule: a change
of the list itself is shipped when the list is assigned again
(set_color_stops).
pub fn set_color_stops(&self, value: FerroList<Rc<dyn IGradientStop>>)
Trait Implementations§
Source§impl Clone for CompositionGradientBrush
impl Clone for CompositionGradientBrush
Source§impl Deref for CompositionGradientBrush
impl Deref for CompositionGradientBrush
Source§type Target = Rc<CompositionBrush>
type Target = Rc<CompositionBrush>
Source§fn deref(&self) -> &Rc<CompositionBrush>
fn deref(&self) -> &Rc<CompositionBrush>
Auto Trait Implementations§
impl !RefUnwindSafe for CompositionGradientBrush
impl !Send for CompositionGradientBrush
impl !Sync for CompositionGradientBrush
impl !UnwindSafe for CompositionGradientBrush
impl Freeze for CompositionGradientBrush
impl Unpin for CompositionGradientBrush
impl UnsafeUnpin for CompositionGradientBrush
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more