DrawingML Shapes
The style information for a shape is specified with the <p:style> element within the <p:Sp>. Note at the outset that the <p:style> element is not within the main drawingML namespace; instead it is either in the presentationML main namespace (prefix p) or in the spreadsheetDrawing namespace (prefix xdr). Four characteristics of a shape are specified with this element: the type of fill, the type of outline, the effects to be applied, and the font. None of the style characteristics are actually defined within the <p:style> element, however. Instead, the element only contains references to the style details found within the theme part. The corresponding elements containing the references are within the main drawingML namespace and are: <a:effectRef>, <a:fillRef>, <a:fontRef>, and <a:lnRef>. Each of these reference elements contains an idx attribute, which is an index to the corresponding lists of properties within the theme part. So it is important to first understand a bit about the theme part.
The core of the theme part is the <a:themeElements> element,which contains most of the style information for the theme in three child elements: <a:clrScheme>, <a:fmtScheme>, and <a:fontScheme>. The <a:fmtScheme> contains four child elements: <a:bgFillStyleLst>, <a:effectStyleLst>, <a:fillStyleLst>, and <a:lnStyleLst>. The four ref child elements within <p:style> refer to the child elements of the <a:themeElements> element within the theme part. Below is first a sample <p:style> element within a shape definition in a presentation slide, followed by an outline of the theme part. The colors indicate reference relationships.
Fill
As noted above, the fill style is specified by the <a:fillRef> element within the style element. The <a:fillRef> references a child element of either the <a:fillStyleLst> or <a:bgFillStyleLst> in the theme part. The particular child element is specified by an index as given in the idx attribute on <a:fillRef>. A value of 0 or 1000 indicates no background; values 1-999 refer to the index of a fill style in <a:fillStyleLst>; and values 1001 and above refer to the index of a background fill style within <a:bgFillStyleLst>. For example, in the sample above, we have <a:fillRef idx="1">, so it refers to the first fill style within the <a:fillStyleLst> of the theme part. Below is the corresponding <a:fillStyleLst> and shape. The first fill style is a solid fill using the theme color accent2, which is defined within the <a:clrScheme> of the theme part. (For more on fills, see Shape Fill.)
Line
The line style is specified by the <a:lnRef> element within the style element. The <a:lnRef> references a child element of the <a:lnStyleLst> element in the theme part. The particular child element is specified by an index as given in the idx attribute on <a:lnRef>. (For more on outlines, see Shape Outline.) In the sample below, the shape references the second line style found within the theme: <a:lnRef idx="2">.
Effect
The effect style is specified by the <a:effectRef> element within the style element. The <a:effectRef> references a child element of the <a:effectStyleLst> element in the theme part. The particular child element is specified by an index as given in the idx attribute on <a:effectRef>. (For more on shape effects, see Shape Effects.) In the sample below, the shape references the first effect style found within the theme: <a:effectRef idx="1">. It applies a blue shadow to the bottom of the shape.
Font
The font style is specified by the <a:fontRef> element within the style element. The <a:fontRef> references a child element of the <a:fontScheme> element in the theme part. The particular font is specified by an index as given in the idx attribute on <a:fontRef>. The <a:fontRef> element also specifies a choice of color. In the sample below, the shape references the minor latin font found within the theme, with the color white.