pub fn new_radial_gradient(gradient: Gradient, center: Point, radius: f32, spread: Spread) -> Source<'a> {
        // Scale gradient to desired radius
        let scale = Transform::create_scale(radius, radius);
        // Transform gradient to center of gradient
        let translate = Transform::create_translation(center.x, center.y);
        // Compute final transform
        let transform = translate.pre_mul(&scale).inverse().unwrap();

        Source::RadialGradient(gradient, spread, transform)
    }
/// Creates a new radial gradient that is centered at the given point and has the given radius.
Creates a new radial gradient that is centered at the given point and has the given radius.
Creates a new radial gradient that is centered at the given point and has the given radius .
pub fn new_radial_gradient(gradient: Gradient, center: Point, radius: f32, spread: Spread) -> Source<'a> {
        // Scale gradient to desired radius
        let scale = Transform::create_scale(radius, radius);
        // Transform gradient to center of gradient
        let translate = Transform::create_translation(center.x, center.y);
        // Compute final transform
        let transform = translate.pre_mul(&scale).inverse().unwrap();
        Source::RadialGradient(gradient, spread, transform)
    }
pub fn new_radial_gradient ( gradient : Gradient , center : Point , radius : f32 , spread : Spread ) -> Source < ' a > { // Scale gradient to desired radius let scale = Transform :: create_scale ( radius , radius ) ; // Transform gradient to center of gradient let translate = Transform :: create_translation ( center . x , center . y ) ; // Compute final transform let transform = translate . pre_mul ( & scale ) . inverse ( ) . unwrap ( ) ; Source :: RadialGradient ( gradient , spread , transform ) }
Creates a new radial gradient that is centered at the given point and has the given radius.
Creates a new radial gradient that is centered at the given point and has the given radius .
gradient
Gradient
center
Point
radius
f32
spread
Spread
gradient
Gradient
center
Point
radius
f32
spread
Spread