# OdfShape

Shared XML-backed shape properties for OpenDocument presentations and drawings.

Class 

`OfficeIMO.OpenDocument`

**Namespace**

`OfficeIMO.OpenDocument`

**Assembly**

`OfficeIMO.OpenDocument`

**Source revision**

`15caddadea70` with working tree changes

**Source**

[OdfShape.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.cs#L10)

**Modifiers**

abstract

Shared XML-backed shape properties for OpenDocument presentations and drawings.

## Inheritance

- object
- OdfShape

## Derived Types

- [OdgShape](/api/open-document/officeimo-opendocument-odgshape/)
- [OdpShape](/api/open-document/officeimo-opendocument-odpshape/)

Filter members 

Show inherited

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public string Name { get; set; }` [#](#property-name)

[OdfShape.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.cs#L10)

Shape name.

`public string? XmlId { get; set; }` [#](#property-xmlid)

[OdfShape.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.cs#L18)

XML identifier used by animation and cross-reference targets. Assigned values are unique across the main XML parts. Connector and animation references in the same page or master follow an identifier change.

`public virtual string? Transform { get; set; }` [#](#property-transform)

[OdfShape.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.cs#L40)

Raw ODF/SVG transform expression.

`public OfficeFillRule FillRule { get; set; }` [#](#property-fillrule)

[OdfShape.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.cs#L45)

Rule used to fill overlapping contours; ODF follows SVG's nonzero default.

`public OdfColor? FillColor { get; set; }` [#](#property-fillcolor)

[OdfShape.cs:56](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.cs#L56)

Solid shape fill color.

`public OdfColor? StrokeColor { get; set; }` [#](#property-strokecolor)

[OdfShape.cs:65](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.cs#L65)

Shape stroke color, including dashed strokes.

`public OdfLength? StrokeWidth { get; set; }` [#](#property-strokewidth)

[OdfShape.cs:76](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.cs#L76)

Shape stroke width.

`public virtual OdfRect Bounds { get; set; }` [#](#property-bounds)

[OdfShape.cs:88](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.cs#L88)

Position and size for shapes exposing SVG bounds.

`public string? FillGradientName { get; set; }` [#](#property-fillgradientname)

[OdfShape.Gradients.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.Gradients.cs#L8)

Effective named gradient when the fill mode is gradient. Setting null explicitly disables the fill.

`public int? GradientStepCount { get; set; }` [#](#property-gradientstepcount)

[OdfShape.Gradients.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.Gradients.cs#L28)

Inherited gradient step count: zero selects automatic interpolation, three or more select fixed bands. Null removes the local override.

`public string? StrokeStartMarkerName { get; set; }` [#](#property-strokestartmarkername)

[OdfShape.Markers.cs:5](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.Markers.cs#L5)

Effective start marker. Setting null explicitly disables it, including an inherited marker.

`public string? StrokeEndMarkerName { get; set; }` [#](#property-strokeendmarkername)

[OdfShape.Markers.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.Markers.cs#L7)

Effective end marker. Setting null explicitly disables it, including an inherited marker.

`public OdfLength? StrokeStartMarkerWidth { get; set; }` [#](#property-strokestartmarkerwidth)

[OdfShape.Markers.cs:9](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.Markers.cs#L9)

Inherited absolute start-marker width; zero suppresses painting. Null removes the local override.

`public OdfLength? StrokeEndMarkerWidth { get; set; }` [#](#property-strokeendmarkerwidth)

[OdfShape.Markers.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.Markers.cs#L11)

Inherited absolute end-marker width; zero suppresses painting. Null removes the local override.

`public bool? StrokeStartMarkerCentered { get; set; }` [#](#property-strokestartmarkercentered)

[OdfShape.Markers.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.Markers.cs#L13)

Whether the start marker is centered on its endpoint. Null removes the local override.

`public bool? StrokeEndMarkerCentered { get; set; }` [#](#property-strokeendmarkercentered)

[OdfShape.Markers.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.Markers.cs#L15)

Whether the end marker is centered on its endpoint. Null removes the local override.

`public double? FillOpacity { get; set; }` [#](#property-fillopacity)

[OdfShape.Opacity.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.Opacity.cs#L8)

Uniform fill opacity from zero to one, including inherited values. Null means no declared value.

`public double? StrokeOpacity { get; set; }` [#](#property-strokeopacity)

[OdfShape.Opacity.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.Opacity.cs#L20)

Stroke opacity from zero to one, including inherited values. Null means no declared value; assignment removes the local override.

`public double? ImageOpacity { get; set; }` [#](#property-imageopacity)

[OdfShape.Opacity.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.Opacity.cs#L27)

Image-pixel opacity from zero to one, including inherited values. This is separate from the frame's fill opacity.

`public OfficeStrokeLineCap? StrokeLineCap { get; set; }` [#](#property-strokelinecap)

[OdfShape.Stroke.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.Stroke.cs#L8)

Inherited stroke cap; null removes the local override and may restore an inherited value.

`public OfficeStrokeLineJoin? StrokeLineJoin { get; set; }` [#](#property-strokelinejoin)

[OdfShape.Stroke.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.Stroke.cs#L20)

Inherited miter, round, or bevel join; null removes the local override.

`public string? StrokeDashName { get; set; }` [#](#property-strokedashname)

[OdfShape.Stroke.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.Stroke.cs#L33)

Effective named dash pattern when the stroke is dashed. Setting null explicitly selects a solid stroke.

`public OdfTextFitMode? TextFitMode { get; set; }` [#](#property-textfitmode)

[OdfShape.TextFitting.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.TextFitting.cs#L17)

Inherited native text fitting; null removes both local fitting declarations.

Exceptions

- `NotSupportedException` – The effective native pair contains unknown, legacy or conflicting active values.
- `ArgumentOutOfRangeException` – The assigned mode is not defined.

`public OfficeTextAreaAlignment? TextAreaAlignment { get; set; }` [#](#property-textareaalignment)

[OdfShape.TextFrame.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.TextFrame.cs#L11)

Inherited horizontal text-area placement; null removes the local override.

Exceptions

- `NotSupportedException` – The effective native value is outside the supported alignment values.

`public OdfTextAreaVerticalAlignment? TextVerticalAlignment { get; set; }` [#](#property-textverticalalignment)

[OdfShape.TextFrame.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.TextFrame.cs#L27)

Inherited native vertical text-area placement; null removes the local override.

Exceptions

- `NotSupportedException` – The effective native value is outside the supported alignment values.

`public bool? WrapText { get; set; }` [#](#property-wraptext)

[OdfShape.TextFrame.cs:42](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.TextFrame.cs#L42)

Inherited native wrapping declaration; null removes the local override.

Exceptions

- `NotSupportedException` – The effective native wrapping declaration is unknown.

`public OdfInsets? TextPadding { get; set; }` [#](#property-textpadding)

[OdfShape.TextFrame.cs:59](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.TextFrame.cs#L59)

Inherited top, right, bottom, and left text insets; null removes all local padding declarations.

Exceptions

- `ArgumentException` – An assigned side is not a finite nonnegative absolute ODF schema length.

`public bool? AutoGrowHeight { get; set; }` [#](#property-autogrowheight)

[OdfShape.TextSizing.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.TextSizing.cs#L10)

Inherited native text-box height growth; null removes the local declaration.

Exceptions

- `NotSupportedException` – The effective declaration is not an ODF boolean.

`public bool? AutoGrowWidth { get; set; }` [#](#property-autogrowwidth)

[OdfShape.TextSizing.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.TextSizing.cs#L18)

Inherited native text-box width growth; null removes the local declaration.

Exceptions

- `NotSupportedException` – The effective declaration is not an ODF boolean.

`public OdfLength? TextBoxMinimumHeight { get; set; }` [#](#property-textboxminimumheight)

[OdfShape.TextSizing.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.TextSizing.cs#L25)

Instance minimum height on the direct text-box container; null removes the attribute.

`public OdfLength? TextBoxMinimumWidth { get; set; }` [#](#property-textboxminimumwidth)

[OdfShape.TextSizing.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.TextSizing.cs#L31)

Instance minimum width on the direct text-box container; null removes the attribute.

`public OdfLength? TextBoxMaximumHeight { get; set; }` [#](#property-textboxmaximumheight)

[OdfShape.TextSizing.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.TextSizing.cs#L37)

Instance maximum height on the direct text-box container; null removes the attribute.

`public OdfLength? TextBoxMaximumWidth { get; set; }` [#](#property-textboxmaximumwidth)

[OdfShape.TextSizing.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Drawing/OdfShape.TextSizing.cs#L43)

Instance maximum width on the direct text-box container; null removes the attribute.

<!-- PowerForge markdown artifact sha256:5F783642242B6732C3E835F1C227307E83FFD272E7A72CFE4CF78EF501DFEFC1 -->
