pub struct GradientFillProperties {
pub flip: Option<TileFlipMode>,
pub rotate_with_shape: Option<bool>,
pub gradient_stop_list: Option<Vec<GradientStop>>,
pub shade_properties: Option<ShadeProperties>,
pub tile_rect: Option<RelativeRect>,
}
Expand description
This element defines a gradient fill.
A gradient fill is a fill which is characterized by a smooth gradual transition from one color to the next. At its simplest, it is a fill which transitions between two colors; or more generally, it can be a transition of any number of colors.
The desired transition colors and locations are defined in the gradient stop list (gsLst) child element.
The other child element defines the properties of the gradient fill (there are two styles– a linear shade style as well as a path shade style)
Fields§
§flip: Option<TileFlipMode>
Specifies the direction(s) in which to flip the gradient while tiling.
Normally a gradient fill encompasses the entire bounding box of the shape which contains the fill. However, with the tileRect element, it is possible to define a “tile” rectangle which is smaller than the bounding box. In this situation, the gradient fill is encompassed within the tile rectangle, and the tile rectangle is tiled across the bounding box to fill the entire area.
rotate_with_shape: Option<bool>
Specifies if a fill rotates along with a shape when the shape is rotated.
gradient_stop_list: Option<Vec<GradientStop>>
The list of gradient stops that specifies the gradient colors and their relative positions in the color band.
shade_properties: Option<ShadeProperties>
Specifies the shade properties.
tile_rect: Option<RelativeRect>
This element specifies a rectangular region of the shape to which the gradient is applied. This region is then tiled across the remaining area of the shape to complete the fill. The tile rectangle is defined by percentage offsets from the sides of the shape’s bounding box.
Each edge of the tile rectangle is defined by a percentage offset from the corresponding edge of the bounding box. A positive percentage specifies an inset, while a negative percentage specifies an outset.
§Note
For example, a left offset of 25% specifies that the left edge of the tile rectangle is located to the right of the bounding box’s left edge by an amount equal to 25% of the bounding box’s width.
Implementations§
Source§impl GradientFillProperties
impl GradientFillProperties
pub fn from_xml_element(xml_node: &XmlNode) -> Result<Self>
Trait Implementations§
Source§impl Clone for GradientFillProperties
impl Clone for GradientFillProperties
Source§fn clone(&self) -> GradientFillProperties
fn clone(&self) -> GradientFillProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more