Compartilhar via


CustomGeometry Class

Custom geometry.When the object is serialized out as xml, its qualified name is a:custGeom.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Drawing.CustomGeometry

Namespace:  DocumentFormat.OpenXml.Drawing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(AdjustValueList))> _
<ChildElementInfoAttribute(GetType(ShapeGuideList))> _
<ChildElementInfoAttribute(GetType(AdjustHandleList))> _
<ChildElementInfoAttribute(GetType(ConnectionSiteList))> _
<ChildElementInfoAttribute(GetType(Rectangle))> _
<ChildElementInfoAttribute(GetType(PathList))> _
Public Class CustomGeometry _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As CustomGeometry
[ChildElementInfoAttribute(typeof(AdjustValueList))]
[ChildElementInfoAttribute(typeof(ShapeGuideList))]
[ChildElementInfoAttribute(typeof(AdjustHandleList))]
[ChildElementInfoAttribute(typeof(ConnectionSiteList))]
[ChildElementInfoAttribute(typeof(Rectangle))]
[ChildElementInfoAttribute(typeof(PathList))]
public class CustomGeometry : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • AdjustValueList <a:avLst>

  • ShapeGuideList <a:gdLst>

  • AdjustHandleList <a:ahLst>

  • ConnectionSiteList <a:cxnLst>

  • Rectangle <a:rect>

  • PathList <a:pathLst>

[ISO/IEC 29500-1 1st Edition]

20.1.9.8 custGeom (Custom Geometry)

This element specifies the existence of a custom geometric shape. This shape consists of a series of lines and curves described within a creation path. In addition to this there can also be adjust values, guides, adjust handles, connection sites and an inscribed rectangle specified for this custom geometric shape.

[Example: Consider the scenario when a preset geometry does not accurately depict what must be displayed in the document. For this a custom geometry can be used to define most any 2-dimensional geometric shape. Shown below is an example of such a custom geometry.

<a:custGeom>
<a:avLst/>
<a:gdLst/>
<a:ahLst/>
<a:cxnLst/>
<a:rect l="0" t="0" r="0" b="0"/>
  <a:pathLst>
<a:path w="2650602" h="1261641">
<a:moveTo>
<a:pt x="0" y="1261641"/>
</a:moveTo>
      <a:lnTo>
<a:pt x="2650602" y="1261641"/>
</a:lnTo>
      <a:lnTo>
<a:pt x="1226916" y="0"/>
</a:lnTo>
<a:close/>
</a:path>
</a:pathLst>
</a:custGeom>

DocumentFormat.OpenXml.Drawing.CustomGeometry-imag

The custom geometry above is drawn by first moving to a specific starting point with the moveTo element. Then a series of lnTo elements in the creation path specify the lines that make up the borders of the shape and finally a close element is used to specify the end of the creation path. The resulting shape is shown above. end example]

Parent Elements

spPr (§21.2.2.197); spPr (§21.3.2.23); spPr (§21.4.3.7); spPr (§20.1.2.2.35); spPr (§20.2.2.6); spPr (§20.5.2.30); spPr (§19.3.1.44)

Child Elements

Subclause

ahLst (List of Shape Adjust Handles)

§20.1.9.1

avLst (List of Shape Adjust Values)

§20.1.9.5

cxnLst (List of Shape Connection Sites)

§20.1.9.10

gdLst (List of Shape Guides)

§20.1.9.12

pathLst (List of Shape Paths)

§20.1.9.16

rect (Shape Text Rectangle)

§20.1.9.22

[Note: The W3C XML Schema definition of this element’s content model (CT_CustomGeometry2D) is located in §A.4.1. end note]

© ISO/IEC29500: 2008.

Thread Safety

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

See Also

Reference

CustomGeometry Members

DocumentFormat.OpenXml.Drawing Namespace