Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OdgShapes

OfficeIMO.OpenDocument

Namespace
OfficeIMO.OpenDocument
Assembly
OfficeIMO.OpenDocument
Source revision
1f76172c94d1 with working tree changes
Implements
IReadOnlyList<OdgShape> IReadOnlyCollection<OdgShape> IEnumerable<OdgShape> IEnumerable
Modifiers
sealed
Attributes
DefaultMember("Item")

An editable drawing-page, master or group collection. Unknown drawing elements remain visible and preserved.

Inheritance

  • object
  • OdgShapes

Usage

Explore 4 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 4

Methods

AddConnector 2 overloads
public OdgShape AddConnector(OfficePoint start, OfficePoint end, OdgConnectorKind kind = Line, string? name = null) #

Adds a connector between free points in this collection's coordinate space.

Parameters

start OfficeIMO.Drawing.OfficePoint required
end OfficeIMO.Drawing.OfficePoint required
kind OfficeIMO.OpenDocument.OdgConnectorKind = Line optional
name string? = null optional

Returns

OdgShape
public OdgShape AddConnector(OdgGluePoint start, OdgGluePoint end, string? name = null) #

Adds a straight connector attached to two explicit glue points on this page or master.

Parameters

start OfficeIMO.OpenDocument.OdgGluePoint required
end OfficeIMO.OpenDocument.OdgGluePoint required
name string? = null optional

Returns

OdgShape
public OdgShape AddEllipse(OdfRect bounds, string? name = null) #

Adds an ellipse.

Parameters

bounds OfficeIMO.OpenDocument.OdfRect required
name string? = null optional

Returns

OdgShape
public OdgShape AddGroup(string? name = null) #

Adds a group; its Children collection accepts the same shape operations.

Parameters

name string? = null optional

Returns

OdgShape
public OdgShape AddImage(byte[] data, string fileName, OdfRect bounds, string? name = null) #

Adds an embedded image using the existing ODF image store.

Parameters

data byte[] required
fileName string required
bounds OfficeIMO.OpenDocument.OdfRect required
name string? = null optional

Returns

OdgShape
public OdgShape AddLine(OdfLength x1, OdfLength y1, OdfLength x2, OdfLength y2, string? name = null) #

Adds a line with absolute page coordinates.

Parameters

x1 OfficeIMO.OpenDocument.OdfLength required
y1 OfficeIMO.OpenDocument.OdfLength required
x2 OfficeIMO.OpenDocument.OdfLength required
y2 OfficeIMO.OpenDocument.OdfLength required
name string? = null optional

Returns

OdgShape
AddPath 2 overloads
public OdgShape AddPath(OdfRect bounds, OdfViewBox viewBox, string pathData, string? name = null) #

Adds a path whose SVG data uses the supplied local view box and is scaled to the page bounds.

Parameters

bounds OfficeIMO.OpenDocument.OdfRect required
viewBox OfficeIMO.OpenDocument.OdfViewBox required
pathData string required
name string? = null optional

Returns

OdgShape
public OdgShape AddPath(OdfRect bounds, OdfViewBox viewBox, IEnumerable<OfficePathCommand> commands, string? name = null) #

Adds a path using shared Drawing commands in the supplied local view box.

Parameters

bounds OfficeIMO.OpenDocument.OdfRect required
viewBox OfficeIMO.OpenDocument.OdfViewBox required
commands System.Collections.Generic.IEnumerable<OfficeIMO.Drawing.OfficePathCommand> required
name string? = null optional

Returns

OdgShape
public OdgShape AddPolygon(OdfRect bounds, OdfViewBox viewBox, IEnumerable<OfficePoint> points, string? name = null) #

Adds a closed polygon using integer coordinates in the supplied local view box.

Parameters

bounds OfficeIMO.OpenDocument.OdfRect required
viewBox OfficeIMO.OpenDocument.OdfViewBox required
points System.Collections.Generic.IEnumerable<OfficeIMO.Drawing.OfficePoint> required
name string? = null optional

Returns

OdgShape
public OdgShape AddPolyline(OdfRect bounds, OdfViewBox viewBox, IEnumerable<OfficePoint> points, string? name = null) #

Adds an open polyline using integer coordinates in the supplied local view box; its initial fill is none.

Parameters

bounds OfficeIMO.OpenDocument.OdfRect required
viewBox OfficeIMO.OpenDocument.OdfViewBox required
points System.Collections.Generic.IEnumerable<OfficeIMO.Drawing.OfficePoint> required
name string? = null optional

Returns

OdgShape
public OdgShape AddRectangle(OdfRect bounds, string? name = null) #

Adds a rectangle.

Parameters

bounds OfficeIMO.OpenDocument.OdfRect required
name string? = null optional

Returns

OdgShape
public OdgShape AddRoundedRectangle(OdfRect bounds, OdfLength radius, string? name = null) #

Adds a rectangle with circular corners. Oversized radii are clamped during rendering.

Parameters

bounds OfficeIMO.OpenDocument.OdfRect required
radius OfficeIMO.OpenDocument.OdfLength required
name string? = null optional

Returns

OdgShape
public OdgShape AddTextBox(OdfRect bounds, string text, string? name = null) #

Adds a text frame.

Parameters

bounds OfficeIMO.OpenDocument.OdfRect required
text string required
name string? = null optional

Returns

OdgShape
public IEnumerator<OdgShape> GetEnumerator() #

Returns an enumerator that iterates through the collection.

Returns

IEnumerator<OdgShape> An enumerator that can be used to iterate through the collection.
public void Move(int sourceIndex, int destinationIndex) #

Changes a shape's paint-order position.

Parameters

sourceIndex int required
destinationIndex int required
public void RemoveAt(int index) #

Removes one shape, including its children.

Parameters

index int required

Properties

public int Count { get; } #

Number of shapes.

public OdgShape this[int index] { get; } #

Shape at a zero-based paint-order position.

Parameters

index int required