Class OdfDrawPageBuilder
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
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
x1Cmdoubley1Cmdoublex2Cmdoubley2CmdoubleconnectorTypeOdfConnectorType
Returns
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
x1Cmdoubley1Cmdoublex2Cmdoubley2CmdoubleconnectorTypeOdfConnectorTypeconfigureAction<OdfDrawShapeBuilder>
Returns
AddConnector(string, string)
Adds a connector linking two shapes. 新增連接兩個圖形的連接線。
public OdfDrawPageBuilder AddConnector(string startShapeId, string endShapeId)
Parameters
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
startShapeIdstringendShapeIdstringconnectorTypeOdfConnectorType
Returns
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
startShapeIdstringendShapeIdstringconnectorTypeOdfConnectorTypeconfigureAction<OdfDrawShapeBuilder>
Returns
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
Returns
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
xCmdoubleThe left position in centimeters. / 左側位置(公分)。
yCmdoubleThe top position in centimeters. / 上方位置(公分)。
widthCmdoubleThe width in centimeters. / 寬度(公分)。
heightCmdoubleThe height in centimeters. / 高度(公分)。
configureAction<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
Returns
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
idstringtextstringindexintshapeTypeOdfShapeType
Returns
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
idstringThe shape identifier. / 圖形識別碼。
textstringThe node text. / 節點文字。
indexintThe node sequence number. / 節點序號。
shapeTypeOdfShapeTypeThe node shape type. / 節點圖形類型。
configureAction<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
namestringThe group name. / 群組名稱。
configureAction<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
Returns
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
imageBytesbyte[]The image byte array. / 圖片位元組。
xCmdoubleThe left position in centimeters. / 左側位置(公分)。
yCmdoubleThe top position in centimeters. / 上方位置(公分)。
widthCmdoubleThe width in centimeters. / 寬度(公分)。
heightCmdoubleThe height in centimeters. / 高度(公分)。
configureAction<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
namestring
Returns
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
Returns
AddLayer(string, bool, string?)
Adds a page layer definition. 新增頁面圖層定義。
public OdfDrawPageBuilder AddLayer(string name, bool isProtected, string? display)
Parameters
namestringThe layer name. / 圖層名稱。
isProtectedboolWhether the layer is read-only. / 圖層是否唯讀。
displaystringThe 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
Returns
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
x1CmdoubleThe start X position in centimeters. / 起點 X 位置(公分)。
y1CmdoubleThe start Y position in centimeters. / 起點 Y 位置(公分)。
x2CmdoubleThe end X position in centimeters. / 終點 X 位置(公分)。
y2CmdoubleThe end Y position in centimeters. / 終點 Y 位置(公分)。
configureAction<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
Returns
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
svgPathDatastringThe SVG path data. / SVG path 資料。
xCmdoubleThe left position in centimeters. / 左側位置(公分)。
yCmdoubleThe top position in centimeters. / 上方位置(公分)。
widthCmdoubleThe width in centimeters. / 寬度(公分)。
heightCmdoubleThe height in centimeters. / 高度(公分)。
configureAction<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
Returns
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
xCmdoubleThe left position in centimeters. / 左側位置(公分)。
yCmdoubleThe top position in centimeters. / 上方位置(公分)。
widthCmdoubleThe width in centimeters. / 寬度(公分)。
heightCmdoubleThe height in centimeters. / 高度(公分)。
configureAction<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
textstringThe text content. / 文字內容。
xCmdoubleThe left position in centimeters. / 左側位置(公分)。
yCmdoubleThe top position in centimeters. / 上方位置(公分)。
widthCmdoubleThe width in centimeters. / 寬度(公分)。
heightCmdoubleThe height in centimeters. / 高度(公分)。
Returns
- OdfDrawPageBuilder
The current builder instance. / 目前 builder 執行個體。