# OfficeShapePresets

Creates reusable OfficeShape descriptors for common DrawingML preset geometries.

Class 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeShapePresets.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeShapePresets.cs#L18)

**Modifiers**

static

Creates reusable [OfficeShape](/api/core/officeimo-drawing-officeshape/) descriptors for common DrawingML preset geometries.

## Inheritance

- object
- OfficeShapePresets

Filter members 

Show inherited

## Methods

TryCreate 2 overloads

`public static bool TryCreate(string? presetName, double width, double height, bool horizontalFlip, bool verticalFlip, out OfficeShape? shape)` [#](#method-trycreate-string-double-double-boolean-boolean-officeimo-drawing-officeshape)

[OfficeShapePresets.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeShapePresets.cs#L18)

Attempts to create a shared OfficeIMO shape for a DrawingML-style preset name.

Parameters

**presetName string? required**

Preset name such as rect, triangle, or rightArrow.

**width double required**

Requested shape width in the caller's layout unit.

**height double required**

Requested shape height in the caller's layout unit.

**horizontalFlip bool required**

Whether the shape geometry should be mirrored horizontally.

**verticalFlip bool required**

Whether the shape geometry should be mirrored vertically.

**shape OfficeIMO.Drawing.OfficeShape? required**

Created shape when the preset is supported.

Returns

`bool` true when the preset could be mapped; otherwise false.

`public static bool TryCreate(string? presetName, double width, double height, out OfficeShape? shape)` [#](#method-trycreate-string-double-double-officeimo-drawing-officeshape)

[OfficeShapePresets.cs:396](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeShapePresets.cs#L396)

Attempts to create a shared OfficeIMO shape for a DrawingML-style preset name.

Parameters

**presetName string? required**

**width double required**

**height double required**

**shape OfficeIMO.Drawing.OfficeShape? required**

Returns

`bool`

## 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?`

<!-- PowerForge markdown artifact sha256:B58211A46030C56D155B8335912D0D0D382F5D78E2947D88C4D64C51FB2F51C8 -->
