Table of Contents

Class FlatGraphicsDocument

Namespace
OdfKit.Drawing
Assembly
OdfKit.dll

Represents an ODF flat XML drawing document (FODG). 表示 ODF 扁平 XML 繪圖文件(FODG)。

public sealed class FlatGraphicsDocument : DrawingDocument, IDisposable, IAsyncDisposable
Inheritance
FlatGraphicsDocument
Implements
Inherited Members

Constructors

FlatGraphicsDocument(OdfPackage)

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

public FlatGraphicsDocument(OdfPackage package)

Parameters

package OdfPackage

The ODF package or flat XML container. / ODF 封裝或扁平 XML 容器。

Methods

Create()

Creates a new FODG flat XML drawing document. 建立新的 FODG 扁平 XML 繪圖文件。

public static FlatGraphicsDocument Create()

Returns

FlatGraphicsDocument

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

CreateFromDocument(DrawingDocument)

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

public static FlatGraphicsDocument CreateFromDocument(DrawingDocument document)

Parameters

document DrawingDocument

The source ODG drawing document. / 來源 ODG 繪圖文件。

Returns

FlatGraphicsDocument

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

Load(Stream)

Loads a FODG flat XML drawing document from the specified stream. 從指定資料流載入 FODG 扁平 XML 繪圖文件。

public static FlatGraphicsDocument Load(Stream stream)

Parameters

stream Stream

Returns

FlatGraphicsDocument

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

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 FlatGraphicsDocument Load(Stream stream, string? fileName)

Parameters

stream Stream
fileName string

Returns

FlatGraphicsDocument

Load(string)

Loads a FODG flat XML drawing document from the specified path. 從指定路徑載入 FODG 扁平 XML 繪圖文件。

public static FlatGraphicsDocument Load(string path)

Parameters

path string

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

Returns

FlatGraphicsDocument

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

LoadAsync(Stream)

Asynchronously loads a FODG flat XML drawing document from the specified stream. 非同步從指定資料流載入 FODG 扁平 XML 繪圖文件。

public static Task<FlatGraphicsDocument> LoadAsync(Stream stream)

Parameters

stream Stream

Returns

Task<FlatGraphicsDocument>

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

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<FlatGraphicsDocument> LoadAsync(Stream stream, string? fileName)

Parameters

stream Stream
fileName string

Returns

Task<FlatGraphicsDocument>

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<FlatGraphicsDocument> LoadAsync(Stream stream, string? fileName, CancellationToken cancellationToken)

Parameters

stream Stream
fileName string
cancellationToken CancellationToken

Returns

Task<FlatGraphicsDocument>

LoadAsync(Stream, CancellationToken)

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

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

Parameters

stream Stream

The document stream. / 文件資料流。

cancellationToken CancellationToken

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

Returns

Task<FlatGraphicsDocument>

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

LoadAsync(string)

Asynchronously loads a FODG flat XML drawing document from the specified path. 非同步從指定路徑載入 FODG 扁平 XML 繪圖文件。

public static Task<FlatGraphicsDocument> LoadAsync(string path)

Parameters

path string

Returns

Task<FlatGraphicsDocument>

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

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<FlatGraphicsDocument> LoadAsync(string path, CancellationToken cancellationToken)

Parameters

path string
cancellationToken CancellationToken

Returns

Task<FlatGraphicsDocument>