Struct GradientFillProperties

Source
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§

Trait Implementations§

Source§

impl Clone for GradientFillProperties

Source§

fn clone(&self) -> GradientFillProperties

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GradientFillProperties

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GradientFillProperties

Source§

fn default() -> GradientFillProperties

Returns the “default value” for a type. Read more
Source§

impl PartialEq for GradientFillProperties

Source§

fn eq(&self, other: &GradientFillProperties) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for GradientFillProperties

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.