pub struct RadialPattern { /* private fields */ }Expand description
Gradient between two circles (centre c0, radius r0) and (c1, r1).
Implementations§
Source§impl RadialPattern
impl RadialPattern
Sourcepub fn new(
color0: [u8; 3],
color1: [u8; 3],
c0x: f64,
c0y: f64,
r0: f64,
c1x: f64,
c1y: f64,
r1: f64,
t0: f64,
t1: f64,
extend_start: bool,
extend_end: bool,
) -> Self
pub fn new( color0: [u8; 3], color1: [u8; 3], c0x: f64, c0y: f64, r0: f64, c1x: f64, c1y: f64, r1: f64, t0: f64, t1: f64, extend_start: bool, extend_end: bool, ) -> Self
Create a radial gradient.
color0/color1: RGB at inner / outer circle.(c0x, c0y, r0): inner circle centre and radius (≥ 0).(c1x, c1y, r1): outer circle centre and radius (≥ 0).t0,t1: parameter range mapping tocolor0/color1. May be inverted (t0 > t1).extend_start/extend_end: extend colour beyond the gradient circles.
Trait Implementations§
Source§impl Pattern for RadialPattern
impl Pattern for RadialPattern
Source§fn is_static_color(&self) -> bool
fn is_static_color(&self) -> bool
Return
true if this pattern yields the same colour at every coordinate.
When true, fill_span will be called once and the result reused across
the whole span (optimisation hint only — correctness is not affected).Auto Trait Implementations§
impl Freeze for RadialPattern
impl RefUnwindSafe for RadialPattern
impl Send for RadialPattern
impl Sync for RadialPattern
impl Unpin for RadialPattern
impl UnsafeUnpin for RadialPattern
impl UnwindSafe for RadialPattern
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
Mutably borrows from an owned value. Read more