pub struct GradientPaint {
pub visible: Option<bool>,
pub opacity: Option<f64>,
pub blend_mode: BlendMode,
pub type: Type,
pub gradient_handle_positions: Vec<Vector>,
pub gradient_stops: Vec<ColorStop>,
}
Fields§
§visible: Option<bool>
Is the paint enabled?
opacity: Option<f64>
Overall opacity of paint (colors within the paint can also have opacity values which would blend with this)
blend_mode: BlendMode
How this node blends with nodes behind it in the scene
type: Type
The string literal representing the paint’s type. Always check the type
before reading other properties.
gradient_handle_positions: Vec<Vector>
This field contains three vectors, each of which are a position in normalized object space (normalized object space is if the top left corner of the bounding box of the object is (0, 0) and the bottom right is (1,1)). The first position corresponds to the start of the gradient (value 0 for the purposes of calculating gradient stops), the second position is the end of the gradient (value 1), and the third handle position determines the width of the gradient.
gradient_stops: Vec<ColorStop>
Positions of key points along the gradient axis with the colors anchored there. Colors along the gradient are interpolated smoothly between neighboring gradient stops.
Implementations§
Trait Implementations§
Source§impl Clone for GradientPaint
impl Clone for GradientPaint
Source§fn clone(&self) -> GradientPaint
fn clone(&self) -> GradientPaint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more