Table of Contents

Class OdfDrawPageBuilder

Namespace
OdfKit.Drawing
Assembly
OdfKit.dll

Provides a fluent creation API for drawing page content. 提供繪圖頁面內容的 Fluent 建立 API。

public sealed class OdfDrawPageBuilder
Inheritance
OdfDrawPageBuilder
Inherited Members

Methods

AddConnector(double, double, double, double)

Adds a coordinate-based connector. 新增座標式連接線。

public OdfDrawPageBuilder AddConnector(double x1Cm, double y1Cm, double x2Cm, double y2Cm)

Parameters

x1Cm double
y1Cm double
x2Cm double
y2Cm double

Returns

OdfDrawPageBuilder

The current builder instance. / 目前 builder 執行個體。

AddConnector(double, double, double, double, OdfConnectorType)

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

public OdfDrawPageBuilder AddConnector(double x1Cm, double y1Cm, double x2Cm, double y2Cm, OdfConnectorType connectorType)

Parameters

x1Cm double
y1Cm double
x2Cm double
y2Cm double
connectorType OdfConnectorType

Returns

OdfDrawPageBuilder

AddConnector(double, double, double, double, OdfConnectorType, Action<OdfDrawShapeBuilder>?)

Full overload of AddConnector that accepts x1Cm, y1Cm, x2Cm, y2Cm, connectorType, and configure. AddConnector 完整多載:接受 x1Cm、y1Cm、x2Cm、y2Cm、connectorType 與 configure。

public OdfDrawPageBuilder AddConnector(double x1Cm, double y1Cm, double x2Cm, double y2Cm, OdfConnectorType connectorType, Action<OdfDrawShapeBuilder>? configure)

Parameters

x1Cm double
y1Cm double
x2Cm double
y2Cm double
connectorType OdfConnectorType
configure Action<OdfDrawShapeBuilder>

Returns

OdfDrawPageBuilder

AddConnector(string, string)

Adds a connector linking two shapes. 新增連接兩個圖形的連接線。

public OdfDrawPageBuilder AddConnector(string startShapeId, string endShapeId)

Parameters

startShapeId string
endShapeId string

Returns

OdfDrawPageBuilder

The current builder instance. / 目前 builder 執行個體。

AddConnector(string, string, OdfConnectorType)

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

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

Parameters

startShapeId string
endShapeId string
connectorType OdfConnectorType

Returns

OdfDrawPageBuilder

AddConnector(string, string, OdfConnectorType, Action<OdfDrawShapeBuilder>?)

Full overload of AddConnector that accepts startShapeId, endShapeId, connectorType, and configure. AddConnector 完整多載:接受 startShapeId、endShapeId、connectorType 與 configure。

public OdfDrawPageBuilder AddConnector(string startShapeId, string endShapeId, OdfConnectorType connectorType, Action<OdfDrawShapeBuilder>? configure)

Parameters

startShapeId string
endShapeId string
connectorType OdfConnectorType
configure Action<OdfDrawShapeBuilder>

Returns

OdfDrawPageBuilder

AddEllipse(double, double, double, double)

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

public OdfDrawPageBuilder AddEllipse(double xCm, double yCm, double widthCm, double heightCm)

Parameters

xCm double
yCm double
widthCm double
heightCm double

Returns

OdfDrawPageBuilder

AddEllipse(double, double, double, double, Action<OdfDrawShapeBuilder>?)

Adds an ellipse shape. 新增橢圓圖形。

public OdfDrawPageBuilder AddEllipse(double xCm, double yCm, double widthCm, double heightCm, Action<OdfDrawShapeBuilder>? configure)

Parameters

xCm double

The left position in centimeters. / 左側位置(公分)。

yCm double

The top position in centimeters. / 上方位置(公分)。

widthCm double

The width in centimeters. / 寬度(公分)。

heightCm double

The height in centimeters. / 高度(公分)。

configure Action<OdfDrawShapeBuilder>

The shape configuration delegate. / 圖形設定委派。

Returns

OdfDrawPageBuilder

The current builder instance. / 目前 builder 執行個體。

AddFlowStep(string, string, int)

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

public OdfDrawPageBuilder AddFlowStep(string id, string text, int index)

Parameters

id string
text string
index int

Returns

OdfDrawPageBuilder

AddFlowStep(string, string, int, OdfShapeType)

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

public OdfDrawPageBuilder AddFlowStep(string id, string text, int index, OdfShapeType shapeType)

Parameters

id string
text string
index int
shapeType OdfShapeType

Returns

OdfDrawPageBuilder

AddFlowStep(string, string, int, OdfShapeType, Action<OdfDrawShapeBuilder>?)

Adds a flow-diagram node and its text according to the layout preset. 依版面 preset 新增流程圖節點與文字。

public OdfDrawPageBuilder AddFlowStep(string id, string text, int index, OdfShapeType shapeType, Action<OdfDrawShapeBuilder>? configure)

Parameters

id string

The shape identifier. / 圖形識別碼。

text string

The node text. / 節點文字。

index int

The node sequence number. / 節點序號。

shapeType OdfShapeType

The node shape type. / 節點圖形類型。

configure Action<OdfDrawShapeBuilder>

The shape configuration delegate. / 圖形設定委派。

Returns

OdfDrawPageBuilder

The current builder instance. / 目前 builder 執行個體。

AddGroup(string, Action<OdfDrawGroupBuilder>)

Adds a shape group. 新增圖形群組。

public OdfDrawPageBuilder AddGroup(string name, Action<OdfDrawGroupBuilder> configure)

Parameters

name string

The group name. / 群組名稱。

configure Action<OdfDrawGroupBuilder>

The group content configuration delegate. / 群組內容設定委派。

Returns

OdfDrawPageBuilder

The current builder instance. / 目前 builder 執行個體。

AddImage(byte[], double, double, double, double)

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

public OdfDrawPageBuilder AddImage(byte[] imageBytes, double xCm, double yCm, double widthCm, double heightCm)

Parameters

imageBytes byte[]
xCm double
yCm double
widthCm double
heightCm double

Returns

OdfDrawPageBuilder

AddImage(byte[], double, double, double, double, Action<OdfDrawShapeBuilder>?)

Adds an image. 新增圖片。

public OdfDrawPageBuilder AddImage(byte[] imageBytes, double xCm, double yCm, double widthCm, double heightCm, Action<OdfDrawShapeBuilder>? configure)

Parameters

imageBytes byte[]

The image byte array. / 圖片位元組。

xCm double

The left position in centimeters. / 左側位置(公分)。

yCm double

The top position in centimeters. / 上方位置(公分)。

widthCm double

The width in centimeters. / 寬度(公分)。

heightCm double

The height in centimeters. / 高度(公分)。

configure Action<OdfDrawShapeBuilder>

The shape configuration delegate. / 圖形設定委派。

Returns

OdfDrawPageBuilder

The current builder instance. / 目前 builder 執行個體。

AddLayer(string)

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

public OdfDrawPageBuilder AddLayer(string name)

Parameters

name string

Returns

OdfDrawPageBuilder

AddLayer(string, bool)

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

public OdfDrawPageBuilder AddLayer(string name, bool isProtected)

Parameters

name string
isProtected bool

Returns

OdfDrawPageBuilder

AddLayer(string, bool, string?)

Adds a page layer definition. 新增頁面圖層定義。

public OdfDrawPageBuilder AddLayer(string name, bool isProtected, string? display)

Parameters

name string

The layer name. / 圖層名稱。

isProtected bool

Whether the layer is read-only. / 圖層是否唯讀。

display string

The display mode. / 顯示模式。

Returns

OdfDrawPageBuilder

The current builder instance. / 目前 builder 執行個體。

AddLine(double, double, double, double)

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

public OdfDrawPageBuilder AddLine(double x1Cm, double y1Cm, double x2Cm, double y2Cm)

Parameters

x1Cm double
y1Cm double
x2Cm double
y2Cm double

Returns

OdfDrawPageBuilder

AddLine(double, double, double, double, Action<OdfDrawShapeBuilder>?)

Adds a line segment. 新增線段。

public OdfDrawPageBuilder AddLine(double x1Cm, double y1Cm, double x2Cm, double y2Cm, Action<OdfDrawShapeBuilder>? configure)

Parameters

x1Cm double

The start X position in centimeters. / 起點 X 位置(公分)。

y1Cm double

The start Y position in centimeters. / 起點 Y 位置(公分)。

x2Cm double

The end X position in centimeters. / 終點 X 位置(公分)。

y2Cm double

The end Y position in centimeters. / 終點 Y 位置(公分)。

configure Action<OdfDrawShapeBuilder>

The shape configuration delegate. / 圖形設定委派。

Returns

OdfDrawPageBuilder

The current builder instance. / 目前 builder 執行個體。

AddPath(string, double, double, double, double)

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

public OdfDrawPageBuilder AddPath(string svgPathData, double xCm, double yCm, double widthCm, double heightCm)

Parameters

svgPathData string
xCm double
yCm double
widthCm double
heightCm double

Returns

OdfDrawPageBuilder

AddPath(string, double, double, double, double, Action<OdfDrawShapeBuilder>?)

Adds an SVG path shape. 新增 SVG 路徑圖形。

public OdfDrawPageBuilder AddPath(string svgPathData, double xCm, double yCm, double widthCm, double heightCm, Action<OdfDrawShapeBuilder>? configure)

Parameters

svgPathData string

The SVG path data. / SVG path 資料。

xCm double

The left position in centimeters. / 左側位置(公分)。

yCm double

The top position in centimeters. / 上方位置(公分)。

widthCm double

The width in centimeters. / 寬度(公分)。

heightCm double

The height in centimeters. / 高度(公分)。

configure Action<OdfDrawShapeBuilder>

The shape configuration delegate. / 圖形設定委派。

Returns

OdfDrawPageBuilder

The current builder instance. / 目前 builder 執行個體。

AddRectangle(double, double, double, double)

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

public OdfDrawPageBuilder AddRectangle(double xCm, double yCm, double widthCm, double heightCm)

Parameters

xCm double
yCm double
widthCm double
heightCm double

Returns

OdfDrawPageBuilder

AddRectangle(double, double, double, double, Action<OdfDrawShapeBuilder>?)

Adds a rectangle shape. 新增矩形圖形。

public OdfDrawPageBuilder AddRectangle(double xCm, double yCm, double widthCm, double heightCm, Action<OdfDrawShapeBuilder>? configure)

Parameters

xCm double

The left position in centimeters. / 左側位置(公分)。

yCm double

The top position in centimeters. / 上方位置(公分)。

widthCm double

The width in centimeters. / 寬度(公分)。

heightCm double

The height in centimeters. / 高度(公分)。

configure Action<OdfDrawShapeBuilder>

The shape configuration delegate. / 圖形設定委派。

Returns

OdfDrawPageBuilder

The current builder instance. / 目前 builder 執行個體。

AddTextBox(string, double, double, double, double)

Adds a text box. 新增文字方塊。

public OdfDrawPageBuilder AddTextBox(string text, double xCm, double yCm, double widthCm, double heightCm)

Parameters

text string

The text content. / 文字內容。

xCm double

The left position in centimeters. / 左側位置(公分)。

yCm double

The top position in centimeters. / 上方位置(公分)。

widthCm double

The width in centimeters. / 寬度(公分)。

heightCm double

The height in centimeters. / 高度(公分)。

Returns

OdfDrawPageBuilder

The current builder instance. / 目前 builder 執行個體。