目錄 / Table of Contents

Class DrawingDocument

Namespace
OdfKit.Drawing
Assembly
OdfKit.dll

Provides named drawing appearance resources. 提供具名稱的繪圖外觀資源。

public class DrawingDocument : OdfDocument, IDisposable, IAsyncDisposable
Inheritance
DrawingDocument
Implements
Derived
Inherited Members

Constructors

DrawingDocument()

Initializes a new instance of the DrawingDocument class. 初始化 DrawingDocument 類別的新執行個體。

public DrawingDocument()

DrawingDocument(OdfPackage)

Initializes a new instance of the DrawingDocument class. 初始化 DrawingDocument 類別的新執行個體。

public DrawingDocument(OdfPackage package)

Parameters

package OdfPackage

The ODF package instance. / Odf 套件執行個體。

Properties

Gradients

Gets all named gradient definitions. 取得所有具名稱的漸層定義。

public IReadOnlyList<OdfGradient> Gradients { get; }

Property Value

IReadOnlyList<OdfGradient>

Markers

Gets all named line-marker definitions. 取得所有具名稱的線段標記定義。

public IReadOnlyList<OdfMarker> Markers { get; }

Property Value

IReadOnlyList<OdfMarker>

Pages

Gets the collection of drawing pages. 取得繪圖頁面的集合。

public OdfDrawPageCollection Pages { get; }

Property Value

OdfDrawPageCollection

Methods

AddConnector(string, string)

Short overload of AddConnector that accepts startShapeId and endShapeId; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 startShapeId 與 endShapeId;其餘可選參數使用預設值並轉呼叫最長 AddConnector 多載。

public OdfShape AddConnector(string startShapeId, string endShapeId)

Parameters

startShapeId string
endShapeId string

Returns

OdfShape

AddConnector(string, string, OdfConnectorType)

Creates a connector linking a start shape and an end shape on the drawing document (applied to the default first page). 在繪圖文件上建立起點與終點相連的連接線(套用至預設第一頁)。

public OdfShape AddConnector(string startShapeId, string endShapeId, OdfConnectorType connectorType)

Parameters

startShapeId string

The start shape identifier. / 起點圖形識別碼。

endShapeId string

The end shape identifier. / 終點圖形識別碼。

connectorType OdfConnectorType

The connector geometry type. / 連接線幾何類型。

Returns

OdfShape

The newly added connector shape instance. / 新增的連接線圖形執行個體。

AddCustomShape(string, OdfLength, OdfLength, OdfLength, OdfLength)

Adds a custom shape to the drawing document (applied to the default first page). 在繪圖文件上新增自定義幾何圖形(套用至預設第一頁)。

public OdfShape AddCustomShape(string shapeType, OdfLength x, OdfLength y, OdfLength width, OdfLength height)

Parameters

shapeType string

The custom shape type name. / 自定義形狀的類型名稱。

x OdfLength

The X-axis position. / X 軸座標位置。

y OdfLength

The Y-axis position. / Y 軸座標位置。

width OdfLength

The width. / 寬度。

height OdfLength

The height. / 高度。

Returns

OdfShape

The newly added custom shape instance. / 新增的自定義幾何圖形執行個體。

AddPage()

Short overload of AddPage that uses default values for all optional parameters and forwards to the full overload. 便利多載:AddPage 的所有可選參數使用預設值並轉呼叫最長多載。

public OdfDrawPage AddPage()

Returns

OdfDrawPage

AddPage(string?)

Adds a drawing page. 新增一個繪圖頁面。

public OdfDrawPage AddPage(string? name)

Parameters

name string

The page name. / 頁面名稱。

Returns

OdfDrawPage

The newly added drawing page instance. / 新增的繪圖頁面執行個體。

AddPath(string, OdfLength, OdfLength, OdfLength, OdfLength)

Adds a path shape to the drawing document (applied to the default first page). 在繪圖文件上新增路徑圖形(套用至預設第一頁)。

public OdfShape AddPath(string svgPathData, OdfLength x, OdfLength y, OdfLength width, OdfLength height)

Parameters

svgPathData string

The SVG path data description string. / SVG path data 路徑描述字串。

x OdfLength

The X-axis position. / X 軸座標位置。

y OdfLength

The Y-axis position. / Y 軸座標位置。

width OdfLength

The width. / 寬度。

height OdfLength

The height. / 高度。

Returns

OdfShape

The newly added path shape instance. / 新增的路徑圖形執行個體。

AddPolygon(IEnumerable<(OdfLength X, OdfLength Y)>)

Adds a polygon shape to the drawing document (applied to the default first page). 在繪圖文件上新增多邊形圖形(套用至預設第一頁)。

public OdfShape AddPolygon(IEnumerable<(OdfLength X, OdfLength Y)> points)

Parameters

points IEnumerable<(OdfLength X, OdfLength Y)>

The length-based coordinate collection of polygon vertices. / 多邊形頂點的長度座標集合。

Returns

OdfShape

The newly added polygon shape instance. / 新增的多邊形圖形執行個體。

BringToFront(string)

Moves a shape to the front of its sibling drawing order. 將圖形移到同層繪圖順序最前方。

public bool BringToFront(string name)

Parameters

name string

The shape id or name. / 圖形識別碼或名稱。

Returns

bool

true if moved; otherwise false. / 若已移動則為 true;否則為 false

Builder()

Creates a new ODG drawing document fluent builder. 建立新的 ODG 繪圖文件 Fluent builder。

public static DrawingDocumentBuilder Builder()

Returns

DrawingDocumentBuilder

A new DrawingDocumentBuilder instance. / 新的 DrawingDocumentBuilder 執行個體。

ClearGradients()

Removes all unreferenced gradient definitions. 移除所有未被參照的漸層定義。

public int ClearGradients()

Returns

int

The number of removed gradients. / 已移除的漸層數量。

ClearMarkers()

Removes all unreferenced marker definitions. 移除所有未被參照的標記定義。

public int ClearMarkers()

Returns

int

The number of removed markers. / 已移除的標記數量。

ClearTemplateUserContent()

Clears template user content. 清除 Template User Content。

protected override void ClearTemplateUserContent()

Remarks

基底實作不做任何事;各文件種類(文字、試算表、簡報、繪圖)於對應的部分類別中覆寫, 依各自的內容模型清除使用者資料。

Create()

Creates a new ODG drawing document. 建立新的 ODG 繪圖文件。

public static DrawingDocument Create()

Returns

DrawingDocument

A new DrawingDocument instance. / 新的 DrawingDocument 執行個體。

CreateFromFlatDocument(FlatGraphicsDocument)

Creates an equivalent ODG (ZIP package) drawing document from a FODG flat XML drawing document, with identical content. 從 FODG 扁平 XML 繪圖文件建立等價的 ODG(ZIP 封裝)繪圖文件,內容完全相同。

public static DrawingDocument CreateFromFlatDocument(FlatGraphicsDocument document)

Parameters

document FlatGraphicsDocument

The source FODG flat XML drawing document. / 來源 FODG 扁平 XML 繪圖文件。

Returns

DrawingDocument

The created DrawingDocument instance. / 建立完成的 DrawingDocument 執行個體。

CreateFromTemplate(GraphicsTemplateDocument)

Short overload of CreateFromTemplate that accepts template; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 template;其餘可選參數使用預設值並轉呼叫最長 CreateFromTemplate 多載。

public static DrawingDocument CreateFromTemplate(GraphicsTemplateDocument template)

Parameters

template GraphicsTemplateDocument

Returns

DrawingDocument

CreateFromTemplate(GraphicsTemplateDocument, bool)

Creates a new drawing document from the specified graphics template document. 從指定的繪圖範本文件建立新的繪圖文件。

public static DrawingDocument CreateFromTemplate(GraphicsTemplateDocument template, bool clearUserContent)

Parameters

template GraphicsTemplateDocument

The graphics template document. / 繪圖範本文件。

clearUserContent bool

Whether to clear the text content of each page in the template while keeping layout and shape structure. / 是否清除範本中各頁面的文字內容,但保留版面配置與形狀結構。

Returns

DrawingDocument

The created DrawingDocument instance. / 建立完成的 DrawingDocument 執行個體。

FindChildElement(OdfNode, string, string)

Finds a child element. 尋找子元素。

public OdfNode? FindChildElement(OdfNode parent, string localName, string nsUri)

Parameters

parent OdfNode

The parent node. / 父節點。

localName string

The local name of the element. / 元素的區域名稱。

nsUri string

The namespace URI. / 命名空間 URI。

Returns

OdfNode

The found child element node, or null if none is found. / 找到的子元素節點,若無則為 null

FindGradient(string)

Finds a named gradient definition. 尋找具名稱的漸層定義。

public OdfGradient? FindGradient(string name)

Parameters

name string

The exact gradient name. / 精確的漸層名稱。

Returns

OdfGradient

The matching gradient, or null. / 相符的漸層;若不存在則為 null

FindMarker(string)

Finds a named line-marker definition. 尋找具名稱的線段標記定義。

public OdfMarker? FindMarker(string name)

Parameters

name string

The exact marker name. / 精確的標記名稱。

Returns

OdfMarker

The matching marker, or null. / 相符的標記;若不存在則為 null

GetConnectors()

Gets a summary list of connectors from all drawing pages in the document. 取得文件中所有繪圖頁面的連接線摘要清單。

public IReadOnlyList<OdfConnectorInfo> GetConnectors()

Returns

IReadOnlyList<OdfConnectorInfo>

GetCustomShapes()

Gets a summary list of custom shapes from all drawing pages in the document. 取得文件中所有繪圖頁面的自定義幾何圖形摘要清單。

public IReadOnlyList<OdfCustomShapeInfo> GetCustomShapes()

Returns

IReadOnlyList<OdfCustomShapeInfo>

GetDefaultContentXml()

Gets the default content XML string. 取得預設的內容 XML 字串。

protected override string GetDefaultContentXml()

Returns

string

The default content XML string. / 預設的內容 XML 字串。

GetDefaultStylesXml()

Gets the default styles XML string. 取得預設的樣式 XML 字串。

protected override string GetDefaultStylesXml()

Returns

string

The default styles XML string. / 預設的樣式 XML 字串。

GetDrawingNode()

Gets the drawing node. 取得繪圖節點。

public OdfNode GetDrawingNode()

Returns

OdfNode

The drawing's OdfKit.DOM.OdfNode node. / 繪圖的 OdfKit.DOM.OdfNode 節點。

GetGroups()

Gets a summary list of group shapes from all drawing pages in the document. 取得文件中所有繪圖頁面的群組圖形摘要清單。

public IReadOnlyList<OdfGroupInfo> GetGroups()

Returns

IReadOnlyList<OdfGroupInfo>

GetLayers()

Gets a summary list of layers from all drawing pages in the document. 取得文件中所有繪圖頁面的圖層摘要清單。

public IReadOnlyList<OdfLayerInfo> GetLayers()

Returns

IReadOnlyList<OdfLayerInfo>

GetPaths()

Gets a summary list of path shapes from all drawing pages in the document. 取得文件中所有繪圖頁面的路徑圖形摘要清單。

public IReadOnlyList<OdfPathInfo> GetPaths()

Returns

IReadOnlyList<OdfPathInfo>

GetPictures()

Gets a summary list of pictures from all drawing pages in the document. 取得文件中所有繪圖頁面的圖片摘要清單。

public IReadOnlyList<OdfDrawPictureInfo> GetPictures()

Returns

IReadOnlyList<OdfDrawPictureInfo>

GetPolygons()

Gets a summary list of polygon shapes from all drawing pages in the document. 取得文件中所有繪圖頁面的多邊形圖形摘要清單。

public IReadOnlyList<OdfPolygonInfo> GetPolygons()

Returns

IReadOnlyList<OdfPolygonInfo>

GetShapeLayerAssignments()

Gets a summary list of shape-to-layer assignments from all drawing pages in the document. 取得文件中所有繪圖頁面的圖形圖層指派摘要清單。

public IReadOnlyList<OdfDrawShapeLayerInfo> GetShapeLayerAssignments()

Returns

IReadOnlyList<OdfDrawShapeLayerInfo>

GetTextBoxes()

Gets a summary list of text boxes from all drawing pages in the document. 取得文件中所有繪圖頁面的文字方塊摘要清單。

public IReadOnlyList<OdfDrawTextBoxInfo> GetTextBoxes()

Returns

IReadOnlyList<OdfDrawTextBoxInfo>

Load(Stream)

Loads an ODG drawing document from the specified stream. 從指定資料流載入 ODG 繪圖文件。

public static DrawingDocument Load(Stream stream)

Parameters

stream Stream

Returns

DrawingDocument

The loaded DrawingDocument instance. / 載入完成的 DrawingDocument 執行個體。

Exceptions

InvalidOperationException

When the specified document is not an ODG drawing. / 當指定文件不是 ODG 繪圖時擲出。

Load(Stream, string?)

Short overload of Load that accepts stream and fileName; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 stream 與 fileName;其餘可選參數使用預設值並轉呼叫最長 Load 多載。

public static DrawingDocument Load(Stream stream, string? fileName)

Parameters

stream Stream
fileName string

Returns

DrawingDocument

Load(string)

Loads an ODG drawing document from the specified path. 從指定路徑載入 ODG 繪圖文件。

public static DrawingDocument Load(string path)

Parameters

path string

The ODG document path. / ODG 文件路徑。

Returns

DrawingDocument

The loaded DrawingDocument instance. / 載入完成的 DrawingDocument 執行個體。

Exceptions

InvalidOperationException

When the specified document is not an ODG drawing. / 當指定文件不是 ODG 繪圖時擲出。

LoadAsync(Stream)

Asynchronously loads an ODG drawing document from the specified stream. 非同步從指定資料流載入 ODG 繪圖文件。

public static Task<DrawingDocument> LoadAsync(Stream stream)

Parameters

stream Stream

Returns

Task<DrawingDocument>

A task representing the asynchronous load operation, whose result is the loaded DrawingDocument. / 代表非同步載入作業的工作,其結果為載入完成的 DrawingDocument

LoadAsync(Stream, string?)

Short overload of LoadAsync that accepts stream and fileName; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 stream 與 fileName;其餘可選參數使用預設值並轉呼叫最長 LoadAsync 多載。

public static Task<DrawingDocument> LoadAsync(Stream stream, string? fileName)

Parameters

stream Stream
fileName string

Returns

Task<DrawingDocument>

LoadAsync(Stream, string?, CancellationToken)

Short overload of LoadAsync that accepts stream, fileName, and cancellationToken; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 stream、fileName 與 cancellationToken;其餘可選參數使用預設值並轉呼叫最長 LoadAsync 多載。

public static Task<DrawingDocument> LoadAsync(Stream stream, string? fileName, CancellationToken cancellationToken)

Parameters

stream Stream
fileName string
cancellationToken CancellationToken

Returns

Task<DrawingDocument>

LoadAsync(Stream, CancellationToken)

Asynchronously loads the document from a stream with a cancellation token. 以取消語彙基元非同步從資料流載入文件。

public static Task<DrawingDocument> LoadAsync(Stream stream, CancellationToken cancellationToken)

Parameters

stream Stream

The document stream. / 文件資料流。

cancellationToken CancellationToken

The cancellation token. / 取消語彙基元。

Returns

Task<DrawingDocument>

A task whose result is the loaded document. / 代表非同步載入作業的工作,其結果為載入完成的文件。

LoadAsync(string)

Asynchronously loads an ODG drawing document from the specified path. 非同步從指定路徑載入 ODG 繪圖文件。

public static Task<DrawingDocument> LoadAsync(string path)

Parameters

path string

Returns

Task<DrawingDocument>

A task representing the asynchronous load operation, whose result is the loaded DrawingDocument. / 代表非同步載入作業的工作,其結果為載入完成的 DrawingDocument

LoadAsync(string, CancellationToken)

Short overload of LoadAsync that accepts path and cancellationToken; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 path 與 cancellationToken;其餘可選參數使用預設值並轉呼叫最長 LoadAsync 多載。

public static Task<DrawingDocument> LoadAsync(string path, CancellationToken cancellationToken)

Parameters

path string
cancellationToken CancellationToken

Returns

Task<DrawingDocument>

MergeContentNodes(OdfDocument, OdfMergeOptions, Dictionary<string, string>)

Merges the content nodes of a source document into this document. 合併來源文件的內容節點至本文件中。

protected override void MergeContentNodes(OdfDocument sourceDoc, OdfMergeOptions options, Dictionary<string, string> renameMap)

Parameters

sourceDoc OdfDocument

The source ODF document. / 來源 ODF 文件。

options OdfMergeOptions

The merge options. / 合併設定選項。

renameMap Dictionary<string, string>

The dictionary mapping renamed style names. / 樣式名稱變更的對照字典。

MoveAfter(string, string)

Moves a shape after another shape in the same sibling drawing order. 將圖形移到同層繪圖順序中另一個圖形之後。

public bool MoveAfter(string name, string referenceName)

Parameters

name string

The shape id or name to move. / 要移動的圖形識別碼或名稱。

referenceName string

The reference shape id or name. / 參考圖形識別碼或名稱。

Returns

bool

true if moved; otherwise false. / 若已移動則為 true;否則為 false

MoveBefore(string, string)

Moves a shape before another shape in the same sibling drawing order. 將圖形移到同層繪圖順序中另一個圖形之前。

public bool MoveBefore(string name, string referenceName)

Parameters

name string

The shape id or name to move. / 要移動的圖形識別碼或名稱。

referenceName string

The reference shape id or name. / 參考圖形識別碼或名稱。

Returns

bool

true if moved; otherwise false. / 若已移動則為 true;否則為 false

RemoveGradient(string)

Removes an unreferenced named gradient. 移除未被參照的具名稱漸層。

public bool RemoveGradient(string name)

Parameters

name string

The exact gradient name. / 精確的漸層名稱。

Returns

bool

true if removed; otherwise false. / 若已移除則為 true,否則為 false

RemoveMarker(string)

Removes an unreferenced named marker. 移除未被參照的具名稱標記。

public bool RemoveMarker(string name)

Parameters

name string

The exact marker name. / 精確的標記名稱。

Returns

bool

true if removed; otherwise false. / 若已移除則為 true,否則為 false

RemovePage(OdfDrawPage)

Removes the specified drawing page when it belongs to this document. 當指定繪圖頁面屬於此文件時將其移除。

public bool RemovePage(OdfDrawPage page)

Parameters

page OdfDrawPage

The drawing page to remove. / 要移除的繪圖頁面。

Returns

bool

true if the page was removed; otherwise, false. / 若已移除頁面則為 true;否則為 false

RemovePage(int)

Removes the drawing page at the specified index. 移除指定索引的繪圖頁面。

public void RemovePage(int pageIndex)

Parameters

pageIndex int

The zero-based page index. / 採 0 為基準的頁面索引。

Exceptions

ArgumentOutOfRangeException

The page index is outside the collection. / 頁面索引超出集合範圍。

RenameGradient(string, string)

Renames a gradient and updates shape references. 重新命名漸層,並更新圖形參照。

public bool RenameGradient(string name, string newName)

Parameters

name string

The current gradient name. / 目前的漸層名稱。

newName string

The new gradient name. / 新漸層名稱。

Returns

bool

true if renamed; otherwise false. / 若已重新命名則為 true,否則為 false

RenameMarker(string, string)

Renames a marker and updates shape references. 重新命名標記,並更新圖形參照。

public bool RenameMarker(string name, string newName)

Parameters

name string

The current marker name. / 目前的標記名稱。

newName string

The new marker name. / 新標記名稱。

Returns

bool

true if renamed; otherwise false. / 若已重新命名則為 true,否則為 false

ReplaceText(string, string)

Replaces text in all drawing text boxes. 取代所有繪圖文字方塊中的文字。

public override void ReplaceText(string search, string replacement)

Parameters

search string

The text to search for. / 要搜尋的文字。

replacement string

The replacement text. / 替換文字。

ReplaceTextInTextBoxes(string, string)

Replaces text in all drawing text boxes and returns the changed text box count. 取代所有繪圖文字方塊中的文字並傳回已變更的文字方塊數量。

public int ReplaceTextInTextBoxes(string search, string replacement)

Parameters

search string

The text to search for. / 要搜尋的文字。

replacement string

The replacement text. / 替換文字。

Returns

int

The number of changed text boxes. / 已變更的文字方塊數量。

SendToBack(string)

Moves a shape to the back of its sibling drawing order. 將圖形移到同層繪圖順序最後方。

public bool SendToBack(string name)

Parameters

name string

The shape id or name. / 圖形識別碼或名稱。

Returns

bool

true if moved; otherwise false. / 若已移動則為 true;否則為 false

SetGradient(string, string, string, string, int)

Adds or updates a named gradient definition. 新增或更新具名稱的漸層定義。

public OdfGradient SetGradient(string name, string style, string startColor, string endColor, int angle)

Parameters

name string

The gradient name. / 漸層名稱。

style string

The gradient style token. / 漸層樣式詞彙。

startColor string

The starting color. / 起始色彩。

endColor string

The ending color. / 結束色彩。

angle int

The angle in tenths of a degree. / 以十分之一度為單位的角度。

Returns

OdfGradient

The created or updated gradient. / 已建立或更新的漸層。

SetMarker(string, string, string)

Adds or updates a named line-marker definition. 新增或更新具名稱的線段標記定義。

public OdfMarker SetMarker(string name, string viewBox, string pathData)

Parameters

name string

The marker name. / 標記名稱。

viewBox string

The SVG view box. / SVG 檢視方塊。

pathData string

The SVG path data. / SVG 路徑資料。

Returns

OdfMarker

The created or updated marker. / 已建立或更新的標記。

UpdatePictures(IEnumerable<OdfPictureUpdateRequest>)

Updates drawing pictures by id or name. 依識別碼或名稱更新繪圖圖片。

public OdfBatchUpdateResult UpdatePictures(IEnumerable<OdfPictureUpdateRequest> requests)

Parameters

requests IEnumerable<OdfPictureUpdateRequest>

The picture update requests. / 圖片更新要求。

Returns

OdfBatchUpdateResult

The batch update result. / 批次更新結果。

UpdateShapes(IEnumerable<OdfShapeUpdateRequest>)

Updates drawing shapes by id or name. 依識別碼或名稱更新繪圖圖形。

public OdfBatchUpdateResult UpdateShapes(IEnumerable<OdfShapeUpdateRequest> requests)

Parameters

requests IEnumerable<OdfShapeUpdateRequest>

The shape update requests. / 圖形更新要求。

Returns

OdfBatchUpdateResult

The batch update result. / 批次更新結果。

UpdateShapes(IEnumerable<string>)

Short overload of UpdateShapes that accepts names; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 names;其餘可選參數使用預設值並轉呼叫最長 UpdateShapes 多載。

public OdfBatchUpdateResult UpdateShapes(IEnumerable<string> names)

Parameters

names IEnumerable<string>

Returns

OdfBatchUpdateResult

UpdateShapes(IEnumerable<string>, OdfLength?)

Short overload of UpdateShapes that accepts names and x; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 names 與 x;其餘可選參數使用預設值並轉呼叫最長 UpdateShapes 多載。

public OdfBatchUpdateResult UpdateShapes(IEnumerable<string> names, OdfLength? x)

Parameters

names IEnumerable<string>
x OdfLength?

Returns

OdfBatchUpdateResult

UpdateShapes(IEnumerable<string>, OdfLength?, OdfLength?)

Short overload of UpdateShapes that accepts names, x, and y; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 names、x 與 y;其餘可選參數使用預設值並轉呼叫最長 UpdateShapes 多載。

public OdfBatchUpdateResult UpdateShapes(IEnumerable<string> names, OdfLength? x, OdfLength? y)

Parameters

names IEnumerable<string>
x OdfLength?
y OdfLength?

Returns

OdfBatchUpdateResult

UpdateShapes(IEnumerable<string>, OdfLength?, OdfLength?, OdfLength?)

Short overload of UpdateShapes that accepts names, x, y, and width; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 names、x、y 與 width;其餘可選參數使用預設值並轉呼叫最長 UpdateShapes 多載。

public OdfBatchUpdateResult UpdateShapes(IEnumerable<string> names, OdfLength? x, OdfLength? y, OdfLength? width)

Parameters

names IEnumerable<string>
x OdfLength?
y OdfLength?
width OdfLength?

Returns

OdfBatchUpdateResult

UpdateShapes(IEnumerable<string>, OdfLength?, OdfLength?, OdfLength?, OdfLength?)

Short overload of UpdateShapes that accepts names, x, y, width, and height; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 names、x、y、width 與 height;其餘可選參數使用預設值並轉呼叫最長 UpdateShapes 多載。

public OdfBatchUpdateResult UpdateShapes(IEnumerable<string> names, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height)

Parameters

names IEnumerable<string>
x OdfLength?
y OdfLength?
width OdfLength?
height OdfLength?

Returns

OdfBatchUpdateResult

UpdateShapes(IEnumerable<string>, OdfLength?, OdfLength?, OdfLength?, OdfLength?, string?)

Updates drawing shapes by id or name. 依識別碼或名稱更新繪圖圖形。

public OdfBatchUpdateResult UpdateShapes(IEnumerable<string> names, OdfLength? x, OdfLength? y, OdfLength? width, OdfLength? height, string? layerName)

Parameters

names IEnumerable<string>

The shape ids or names. / 圖形識別碼或名稱。

x OdfLength?

The optional X-axis position. / 選用的 X 軸位置。

y OdfLength?

The optional Y-axis position. / 選用的 Y 軸位置。

width OdfLength?

The optional width. / 選用的寬度。

height OdfLength?

The optional height. / 選用的高度。

layerName string

The optional layer name. / 選用的圖層名稱。

Returns

OdfBatchUpdateResult

The batch update result. / 批次更新結果。