Struct vega_lite_4::PurpleLinearGradientBuilder
source · pub struct PurpleLinearGradientBuilder { /* private fields */ }
Expand description
Builder for PurpleLinearGradient
.
Implementations§
source§impl PurpleLinearGradientBuilder
impl PurpleLinearGradientBuilder
sourcepub fn gradient<VALUE: Into<Gradient>>(&mut self, value: VALUE) -> &mut Self
pub fn gradient<VALUE: Into<Gradient>>(&mut self, value: VALUE) -> &mut Self
The type of gradient. Use "linear"
for a linear gradient.
The type of gradient. Use "radial"
for a radial gradient.
pub fn id<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
sourcepub fn stops<VALUE: Into<Vec<GradientStop>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn stops<VALUE: Into<Vec<GradientStop>>>( &mut self, value: VALUE ) -> &mut Self
An array of gradient stops defining the gradient color sequence.
sourcepub fn x1<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn x1<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
The starting x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
Default value: 0
The x-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle for the gradient.
Default value: 0.5
sourcepub fn x2<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn x2<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
The ending x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
Default value: 1
The x-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle for the gradient.
Default value: 0.5
sourcepub fn y1<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn y1<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
The starting y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
Default value: 0
The y-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle for the gradient.
Default value: 0.5
sourcepub fn y2<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn y2<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
The ending y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.
Default value: 0
The y-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle for the gradient.
Default value: 0.5
sourcepub fn r1<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn r1<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
The radius length, in normalized [0, 1] coordinates, of the inner circle for the gradient.
Default value: 0
sourcepub fn r2<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn r2<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
The radius length, in normalized [0, 1] coordinates, of the outer circle for the gradient.
Default value: 0.5
sourcepub fn expr<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn expr<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Vega expression (which can refer to Vega-Lite parameters).
sourcepub fn build(
&self
) -> Result<PurpleLinearGradient, PurpleLinearGradientBuilderError>
pub fn build( &self ) -> Result<PurpleLinearGradient, PurpleLinearGradientBuilderError>
Trait Implementations§
source§impl Clone for PurpleLinearGradientBuilder
impl Clone for PurpleLinearGradientBuilder
source§fn clone(&self) -> PurpleLinearGradientBuilder
fn clone(&self) -> PurpleLinearGradientBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more