pub struct GradientFill {
pub stops: Vec<GradientStop>,
pub angle_60000ths: Option<i32>,
}Expand description
A gradient fill (<a:gradFill>, CT_GradientFillProperties).
Only linear shading (<a:lin ang="..">) is modeled — EG_ShadeProperties’s other choice,
path-based shading (<a:path path="circle"/"rect"/"shape">, radiating from a point or rectangle
rather than along a straight line), is deferred; tileRect/flip/rotWithShape (fine-grained
tiling controls) are not modeled either.
Fields§
§stops: Vec<GradientStop><a:gsLst><a:gs>.. — the gradient’s color stops. The schema requires at least 2; not
enforced at the model level (same best-effort posture as e.g.
ExcelTable::table_style_name).
angle_60000ths: Option<i32><a:lin ang=".."> — the gradient’s direction, in 60,000ths of a degree. None omits
<a:lin> entirely (an unspecified/default direction).
Implementations§
Source§impl GradientFill
impl GradientFill
Sourcepub fn new() -> GradientFill
pub fn new() -> GradientFill
Creates an empty gradient (no stops, no angle).
Sourcepub fn with_stop(self, stop: GradientStop) -> GradientFill
pub fn with_stop(self, stop: GradientStop) -> GradientFill
Appends one color stop.
Sourcepub fn with_angle_degrees(self, degrees: f64) -> GradientFill
pub fn with_angle_degrees(self, degrees: f64) -> GradientFill
Sets the gradient’s linear direction, given in ordinary degrees.
Trait Implementations§
Source§impl Clone for GradientFill
impl Clone for GradientFill
Source§fn clone(&self) -> GradientFill
fn clone(&self) -> GradientFill
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more