Struct sixtyfps_corelib::graphics::LinearGradientBrush [−][src]
#[repr(transparent)]pub struct LinearGradientBrush(_);
The LinearGradientBrush describes a way of filling a shape with different colors, which are interpolated between different stops. The colors are aligned with a line that’s rotated by the LinearGradient’s angle.
Implementations
impl LinearGradientBrush
[src]
impl LinearGradientBrush
[src]pub fn new(angle: f32, stops: impl IntoIterator<Item = GradientStop>) -> Self
[src]
Creates a new linear gradient, described by the specified angle and the provided color stops.
The angle need to be specified in degrees. The stops don’t need to be sorted as this function will sort them.
pub fn angle(&self) -> f32
[src]
Returns the angle of the linear gradient in degrees.
pub fn stops<'a>(&'a self) -> impl Iterator<Item = &'a GradientStop> + 'a
[src]
Returns the color stops of the linear gradient. The stops are sorted by positions.
Trait Implementations
impl Clone for LinearGradientBrush
[src]
impl Clone for LinearGradientBrush
[src]fn clone(&self) -> LinearGradientBrush
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl From<LinearGradientBrush> for Brush
[src]
impl From<LinearGradientBrush> for Brush
[src]fn from(original: LinearGradientBrush) -> Brush
[src]
impl PartialEq<LinearGradientBrush> for LinearGradientBrush
[src]
impl PartialEq<LinearGradientBrush> for LinearGradientBrush
[src]fn eq(&self, other: &LinearGradientBrush) -> bool
[src]
fn ne(&self, other: &LinearGradientBrush) -> bool
[src]
Auto Trait Implementations
impl RefUnwindSafe for LinearGradientBrush
impl RefUnwindSafe for LinearGradientBrush
impl !Send for LinearGradientBrush
impl !Send for LinearGradientBrush
impl !Sync for LinearGradientBrush
impl !Sync for LinearGradientBrush
impl Unpin for LinearGradientBrush
impl Unpin for LinearGradientBrush
impl UnwindSafe for LinearGradientBrush
impl UnwindSafe for LinearGradientBrush