Table of Contents

Class OdfSlideBuilder

Namespace
OdfKit.Presentation
Assembly
OdfKit.dll

Provides a fluent builder API for slide content. 提供投影片內容的 Fluent 建立 API。

public sealed class OdfSlideBuilder
Inheritance
OdfSlideBuilder
Inherited Members

Methods

AddChartPlaceholder(double, double, double, double)

Adds a chart placeholder. 新增圖表預留位置。

public OdfSlideBuilder AddChartPlaceholder(double xCm, double yCm, double widthCm, double heightCm)

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. / 高度,單位為公分。

Returns

OdfSlideBuilder

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

AddEmphasisEffect(string, OdfAnimationEffect)

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

public OdfSlideBuilder AddEmphasisEffect(string shapeId, OdfAnimationEffect effect)

Parameters

shapeId string
effect OdfAnimationEffect

Returns

OdfSlideBuilder

AddEmphasisEffect(string, OdfAnimationEffect, double)

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

public OdfSlideBuilder AddEmphasisEffect(string shapeId, OdfAnimationEffect effect, double durationSeconds)

Parameters

shapeId string
effect OdfAnimationEffect
durationSeconds double

Returns

OdfSlideBuilder

AddEmphasisEffect(string, OdfAnimationEffect, double, OdfAnimationTrigger)

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

public OdfSlideBuilder AddEmphasisEffect(string shapeId, OdfAnimationEffect effect, double durationSeconds, OdfAnimationTrigger trigger)

Parameters

shapeId string
effect OdfAnimationEffect
durationSeconds double
trigger OdfAnimationTrigger

Returns

OdfSlideBuilder

AddEmphasisEffect(string, OdfAnimationEffect, double, OdfAnimationTrigger, double)

Adds a slide emphasis animation. 新增投影片強調動畫。

public OdfSlideBuilder AddEmphasisEffect(string shapeId, OdfAnimationEffect effect, double durationSeconds, OdfAnimationTrigger trigger, double delaySeconds)

Parameters

shapeId string

The target shape identifier. / 目標圖形識別碼。

effect OdfAnimationEffect

The animation effect. / 動畫效果。

durationSeconds double

The duration in seconds. / 持續秒數。

trigger OdfAnimationTrigger

The trigger mode. / 觸發方式。

delaySeconds double

The delay in seconds. / 延遲秒數。

Returns

OdfSlideBuilder

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

AddEntranceEffect(string, OdfAnimationEffect)

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

public OdfSlideBuilder AddEntranceEffect(string shapeId, OdfAnimationEffect effect)

Parameters

shapeId string
effect OdfAnimationEffect

Returns

OdfSlideBuilder

AddEntranceEffect(string, OdfAnimationEffect, OdfAnimationTrigger)

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

public OdfSlideBuilder AddEntranceEffect(string shapeId, OdfAnimationEffect effect, OdfAnimationTrigger trigger)

Parameters

shapeId string
effect OdfAnimationEffect
trigger OdfAnimationTrigger

Returns

OdfSlideBuilder

AddEntranceEffect(string, OdfAnimationEffect, OdfAnimationTrigger, double)

Adds an entrance animation to the specified shape. 為指定圖形新增進場動畫。

public OdfSlideBuilder AddEntranceEffect(string shapeId, OdfAnimationEffect effect, OdfAnimationTrigger trigger, double delaySeconds)

Parameters

shapeId string

The target shape identifier. / 目標圖形識別碼。

effect OdfAnimationEffect

The animation effect. / 動畫效果。

trigger OdfAnimationTrigger

The trigger mode. / 觸發方式。

delaySeconds double

The delay in seconds. / 延遲秒數。

Returns

OdfSlideBuilder

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

AddExitEffect(string, OdfAnimationEffect)

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

public OdfSlideBuilder AddExitEffect(string shapeId, OdfAnimationEffect effect)

Parameters

shapeId string
effect OdfAnimationEffect

Returns

OdfSlideBuilder

AddExitEffect(string, OdfAnimationEffect, OdfAnimationTrigger)

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

public OdfSlideBuilder AddExitEffect(string shapeId, OdfAnimationEffect effect, OdfAnimationTrigger trigger)

Parameters

shapeId string
effect OdfAnimationEffect
trigger OdfAnimationTrigger

Returns

OdfSlideBuilder

AddExitEffect(string, OdfAnimationEffect, OdfAnimationTrigger, double)

Adds a slide exit animation. 新增投影片退場動畫。

public OdfSlideBuilder AddExitEffect(string shapeId, OdfAnimationEffect effect, OdfAnimationTrigger trigger, double delaySeconds)

Parameters

shapeId string

The target shape identifier. / 目標圖形識別碼。

effect OdfAnimationEffect

The animation effect. / 動畫效果。

trigger OdfAnimationTrigger

The trigger mode. / 觸發方式。

delaySeconds double

The delay in seconds. / 延遲秒數。

Returns

OdfSlideBuilder

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

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

Adds an image. 新增圖片。

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

Parameters

imageBytes byte[]

The image bytes. / 圖片位元組。

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

OdfSlideBuilder

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

AddShape(OdfShapeType, double, double, double, double)

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

public OdfSlideBuilder AddShape(OdfShapeType shapeType, double xCm, double yCm, double widthCm, double heightCm)

Parameters

shapeType OdfShapeType
xCm double
yCm double
widthCm double
heightCm double

Returns

OdfSlideBuilder

AddShape(OdfShapeType, double, double, double, double, Action<OdfPresentationShapeBuilder>?)

Adds a basic shape. 新增基本圖形。

public OdfSlideBuilder AddShape(OdfShapeType shapeType, double xCm, double yCm, double widthCm, double heightCm, Action<OdfPresentationShapeBuilder>? configure)

Parameters

shapeType OdfShapeType

The shape type. / 圖形類型。

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<OdfPresentationShapeBuilder>

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

Returns

OdfSlideBuilder

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

AddTextBox(IEnumerable<string>, double, double, double, double)

Adds a multi-paragraph text box. 新增多段落文字方塊。

public OdfSlideBuilder AddTextBox(IEnumerable<string> paragraphs, double xCm, double yCm, double widthCm, double heightCm)

Parameters

paragraphs IEnumerable<string>

The paragraph text collection. / 段落文字集合。

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

OdfSlideBuilder

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

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

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

public OdfSlideBuilder 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

OdfSlideBuilder

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

AddTitle(string)

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

public OdfSlideBuilder AddTitle(string text)

Parameters

text string

Returns

OdfSlideBuilder

AddTitle(string, double)

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

public OdfSlideBuilder AddTitle(string text, double xCm)

Parameters

text string
xCm double

Returns

OdfSlideBuilder

AddTitle(string, double, double)

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

public OdfSlideBuilder AddTitle(string text, double xCm, double yCm)

Parameters

text string
xCm double
yCm double

Returns

OdfSlideBuilder

AddTitle(string, double, double, double)

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

public OdfSlideBuilder AddTitle(string text, double xCm, double yCm, double widthCm)

Parameters

text string
xCm double
yCm double
widthCm double

Returns

OdfSlideBuilder

AddTitle(string, double, double, double, double)

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

public OdfSlideBuilder AddTitle(string text, double xCm, double yCm, double widthCm, double heightCm)

Parameters

text string

The title text. / 標題文字。

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

OdfSlideBuilder

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

AddTitlePlaceholder()

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

public OdfSlideBuilder AddTitlePlaceholder()

Returns

OdfSlideBuilder

AddTitlePlaceholder(double)

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

public OdfSlideBuilder AddTitlePlaceholder(double xCm)

Parameters

xCm double

Returns

OdfSlideBuilder

AddTitlePlaceholder(double, double)

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

public OdfSlideBuilder AddTitlePlaceholder(double xCm, double yCm)

Parameters

xCm double
yCm double

Returns

OdfSlideBuilder

AddTitlePlaceholder(double, double, double)

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

public OdfSlideBuilder AddTitlePlaceholder(double xCm, double yCm, double widthCm)

Parameters

xCm double
yCm double
widthCm double

Returns

OdfSlideBuilder

AddTitlePlaceholder(double, double, double, double)

Adds a title placeholder. 新增標題預留位置。

public OdfSlideBuilder AddTitlePlaceholder(double xCm, double yCm, double widthCm, double heightCm)

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. / 高度,單位為公分。

Returns

OdfSlideBuilder

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

WithLayout(OdfPresentationLayout)

Applies a standard slide layout. 套用標準投影片版面。

public OdfSlideBuilder WithLayout(OdfPresentationLayout layout)

Parameters

layout OdfPresentationLayout

The slide layout. / 投影片版面。

Returns

OdfSlideBuilder

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

WithSpeakerNotes(IEnumerable<string>)

Sets multi-paragraph speaker notes text. 設定多段落講者備忘文字。

public OdfSlideBuilder WithSpeakerNotes(IEnumerable<string> paragraphs)

Parameters

paragraphs IEnumerable<string>

The speaker notes paragraph collection. / 講者備忘段落集合。

Returns

OdfSlideBuilder

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

WithSpeakerNotes(string)

Sets speaker notes text. 設定講者備忘文字。

public OdfSlideBuilder WithSpeakerNotes(string notes)

Parameters

notes string

The speaker notes content. / 講者備忘內容。

Returns

OdfSlideBuilder

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

WithTransition(OdfTransitionType)

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

public OdfSlideBuilder WithTransition(OdfTransitionType type)

Parameters

type OdfTransitionType

Returns

OdfSlideBuilder

WithTransition(OdfTransitionType, double)

Sets the slide transition effect. 設定投影片切換效果。

public OdfSlideBuilder WithTransition(OdfTransitionType type, double durationPoints)

Parameters

type OdfTransitionType

The transition type. / 切換類型。

durationPoints double

The duration in points. / 持續時間,單位為點。

Returns

OdfSlideBuilder

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