2.2.5.4.2 Style-to-Shape Inheritance

Shapes in a web drawing can be linked to a style, which can affect various properties of the shape including its visual appearance. A relationship to such a style is called style-to-shape inheritance. A style-to-shape inheritance allows a shape to take on properties from the style it inherits from. A shape can have zero to three style-to-shape inheritance relationships.

The style-to-shape inheritances in a web drawing are specified by the Page XML Part. Each style-to-shape inheritance is specified by the attributes of a ShapeSheet_Type child element of the Shapes_Type descendant element of the PageContents element in a part. Style-to-shape inheritance information is specified by the ShapeSheet_Type element and a StyleSheet_Type child element of a StyleSheets_Type child element of the VisioDocument element in the Document XML Part.

If the LineStyle, FillStyle, and TextStyle attributes of the ShapeSheet_Type element are empty, a style-to-shape inheritance is not specified. If the LineStyle, FillStyle, or TextStyle attributes of the ShapeSheet_Type element are not empty, a style-to-shape inheritance exists individually for each attribute between the ShapeSheet_Type element and the StyleSheet_Type element whose ID attribute value is equal to the value of a LineStyle, FillStyle, or TextStyle attribute of the ShapeSheet_Type element.

The LineStyle, FillStyle, and TextStyle attributes of a ShapeSheet_Type element each specify a set of Cell_Type child elements of the StyleSheet_Type element as specified in the following table.

Attribute

Cell_Type elements

LineStyle

Specifies Cell_Type elements related to line properties except for Cell_Type child elements of a FillGradient Section_Type.

FillStyle

Specifies Cell_Type elements related to fill properties and effect properties including Cell_Type child elements of a FillGradient Section_Type.

TextStyle

Specifies Cell_Type elements related to text