<gradFill> (Gradient Fill)

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 may 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)

example:

The following is a sample gradient fill, varying from blue to white:

Parent Elements

<bg>5.9.3.1); <bgFillStyleLst>5.1.4.1.7); <bgPr>4.4.1.2); <defRPr>5.1.5.3.2); <endParaRPr>5.1.5.2.3); <fill>5.1.10.28); <fill>5.1.4.2.9); <fillOverlay>5.1.10.29); <fillStyleLst>5.1.4.1.13); <grpSpPr>5.8.2.14); <grpSpPr>4.4.1.20); <grpSpPr>5.1.2.1.22); <grpSpPr>5.6.2.17); <ln>5.1.2.1.24); <lnB>5.1.6.3); <lnBlToTr>5.1.6.4); <lnL>5.1.6.5); <lnR>5.1.6.6); <lnT>5.1.6.7); <lnTlToBr>5.1.6.8); <rPr>5.1.5.3.9); <spPr>5.6.2.29); <spPr>5.7.2.198); <spPr>5.8.2.23); <spPr>5.1.2.1.35); <spPr>4.4.1.41); <spPr>5.9.3.7); <spPr>5.2.2.6); <tblPr>5.1.6.13); <tcPr>5.1.6.15); <uFill>5.1.5.3.12); <uLn>5.1.5.3.14)

Child Elements

Subclause

<gsLst> (Gradient Stop List)

§5.1.10.37

<lin> (Linear Gradient Fill)

§5.1.10.41

<path> (Path Gradient)

§5.1.10.46

<tileRect> (Tile Rectangle)

§5.1.10.59

Attributes

Description

<flip> (Tile Flip)

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.

The possible values for this attribute are defined by the ST_TileFlipMode simple type (§5.1.12.86).

<rotWithShape> (Rotate With Shape)

Specifies if a fill will rotate along with a shape when the shape is rotated.

example:

The following is a fill with the flip attribute set to "x". The black interior rectangle indicates the tile rectangle. Notice that the adjacent rectangle to the right in the tile has been flipped along the x-axis.


The possible values for this attribute are defined by the XML Schema boolean datatype.

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_GradientFillProperties">
	<sequence>
	<element name="gsLst" type="CT_GradientStopList" minOccurs="0" maxOccurs="1"/>
	<group ref="EG_ShadeProperties" minOccurs="0" maxOccurs="1"/>
	<element name="tileRect" type="CT_RelativeRect" minOccurs="0" maxOccurs="1"/>
	</sequence>
	<attribute name="flip" type="ST_TileFlipMode" use="optional"/>
	<attribute name="rotWithShape" type="xsd:boolean" use="optional"/>
</complexType>