LinearShadeProperties class

Office 2013 and later

Defines the LinearShadeProperties Class.This class is available in Office2010 or above. When the object is serialized out as xml, its qualified name is w14:lin.

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Office2010.Word.LinearShadeProperties

Namespace:  DocumentFormat.OpenXml.Office2010.Word
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
public class LinearShadeProperties : OpenXmlLeafElement

2.5.12 CT_LinearShadeProperties

Target namespace: http://schemas.microsoft.com/office/word/2010/wordml

Referenced by: CT_GradientFillProperties

A complex type that specifies linear gradient.

Attributes:

ang: An optional ST_PositiveFixedAngle (as specified in [ISO/IEC-29500-1] section 20.1.10.44) attribute that specifies the direction of color change for the gradient. To define this angle, let its value be x measured clockwise. Then (-sin x, cos x) is a vector parallel to the line of constant color in the gradient fill. Default value for this attribute is 0.

scaled: An optional ST_OnOff attribute that specifies whether the gradient angle scales with the fill area. Mathematically, if this flag is true, then the gradient vector (cos x, sin x) is scaled by the width(w) and height(h) of the fill area, so that the vector becomes (w cos x, h sin x) (before normalization). Observe that now if the gradient angle is 45 degrees, the gradient vector is (w,h), which goes from top-left to bottom–right of the fill area. If this flag is false, the gradient angle is independent of the fill area and is not scaled using the manipulation described earlier. So a 45-degree gradient angle always give a gradient band whose line of constant color is parallel to the vector (1, -1). By default, linear shade is not scaled.

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this complex type.

<xsd:complexType name="CT_LinearShadeProperties">

<xsd:attribute name="ang" type="a:ST_PositiveFixedAngle" use="optional"/>

<xsd:attribute name="scaled" type="ST_OnOff" use="optional"/>

</xsd:complexType>

See section 5.1 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: