[][src]Struct oox::shared::drawingml::shapeprops::GradientFillProperties

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>,
}

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.

Methods

impl GradientFillProperties[src]

pub fn from_xml_element(xml_node: &XmlNode) -> Result<Self>[src]

Trait Implementations

impl Clone for GradientFillProperties[src]

impl Debug for GradientFillProperties[src]

impl Default for GradientFillProperties[src]

impl PartialEq<GradientFillProperties> for GradientFillProperties[src]

impl StructuralPartialEq for GradientFillProperties[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.