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
xCmdoubleThe left position in centimeters. / 左側位置,單位為公分。
yCmdoubleThe top position in centimeters. / 上方位置,單位為公分。
widthCmdoubleThe width in centimeters. / 寬度,單位為公分。
heightCmdoubleThe 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
shapeIdstringeffectOdfAnimationEffect
Returns
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
shapeIdstringeffectOdfAnimationEffectdurationSecondsdouble
Returns
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
shapeIdstringeffectOdfAnimationEffectdurationSecondsdoubletriggerOdfAnimationTrigger
Returns
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
shapeIdstringThe target shape identifier. / 目標圖形識別碼。
effectOdfAnimationEffectThe animation effect. / 動畫效果。
durationSecondsdoubleThe duration in seconds. / 持續秒數。
triggerOdfAnimationTriggerThe trigger mode. / 觸發方式。
delaySecondsdoubleThe 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
shapeIdstringeffectOdfAnimationEffect
Returns
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
shapeIdstringeffectOdfAnimationEffecttriggerOdfAnimationTrigger
Returns
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
shapeIdstringThe target shape identifier. / 目標圖形識別碼。
effectOdfAnimationEffectThe animation effect. / 動畫效果。
triggerOdfAnimationTriggerThe trigger mode. / 觸發方式。
delaySecondsdoubleThe 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
shapeIdstringeffectOdfAnimationEffect
Returns
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
shapeIdstringeffectOdfAnimationEffecttriggerOdfAnimationTrigger
Returns
AddExitEffect(string, OdfAnimationEffect, OdfAnimationTrigger, double)
Adds a slide exit animation. 新增投影片退場動畫。
public OdfSlideBuilder AddExitEffect(string shapeId, OdfAnimationEffect effect, OdfAnimationTrigger trigger, double delaySeconds)
Parameters
shapeIdstringThe target shape identifier. / 目標圖形識別碼。
effectOdfAnimationEffectThe animation effect. / 動畫效果。
triggerOdfAnimationTriggerThe trigger mode. / 觸發方式。
delaySecondsdoubleThe 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
imageBytesbyte[]The image bytes. / 圖片位元組。
xCmdoubleThe left position in centimeters. / 左側位置,單位為公分。
yCmdoubleThe top position in centimeters. / 上方位置,單位為公分。
widthCmdoubleThe width in centimeters. / 寬度,單位為公分。
heightCmdoubleThe 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
shapeTypeOdfShapeTypexCmdoubleyCmdoublewidthCmdoubleheightCmdouble
Returns
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
shapeTypeOdfShapeTypeThe shape type. / 圖形類型。
xCmdoubleThe left position in centimeters. / 左側位置,單位為公分。
yCmdoubleThe top position in centimeters. / 上方位置,單位為公分。
widthCmdoubleThe width in centimeters. / 寬度,單位為公分。
heightCmdoubleThe height in centimeters. / 高度,單位為公分。
configureAction<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
paragraphsIEnumerable<string>The paragraph text collection. / 段落文字集合。
xCmdoubleThe left position in centimeters. / 左側位置,單位為公分。
yCmdoubleThe top position in centimeters. / 上方位置,單位為公分。
widthCmdoubleThe width in centimeters. / 寬度,單位為公分。
heightCmdoubleThe 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
textstringThe text content. / 文字內容。
xCmdoubleThe left position in centimeters. / 左側位置,單位為公分。
yCmdoubleThe top position in centimeters. / 上方位置,單位為公分。
widthCmdoubleThe width in centimeters. / 寬度,單位為公分。
heightCmdoubleThe 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
textstring
Returns
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
Returns
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
Returns
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
Returns
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
textstringThe title text. / 標題文字。
xCmdoubleThe left position in centimeters. / 左側位置,單位為公分。
yCmdoubleThe top position in centimeters. / 上方位置,單位為公分。
widthCmdoubleThe width in centimeters. / 寬度,單位為公分。
heightCmdoubleThe 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
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
xCmdouble
Returns
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
Returns
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
Returns
AddTitlePlaceholder(double, double, double, double)
Adds a title placeholder. 新增標題預留位置。
public OdfSlideBuilder AddTitlePlaceholder(double xCm, double yCm, double widthCm, double heightCm)
Parameters
xCmdoubleThe left position in centimeters. / 左側位置,單位為公分。
yCmdoubleThe top position in centimeters. / 上方位置,單位為公分。
widthCmdoubleThe width in centimeters. / 寬度,單位為公分。
heightCmdoubleThe height in centimeters. / 高度,單位為公分。
Returns
- OdfSlideBuilder
The current builder instance. / 目前 builder 執行個體。
WithLayout(OdfPresentationLayout)
Applies a standard slide layout. 套用標準投影片版面。
public OdfSlideBuilder WithLayout(OdfPresentationLayout layout)
Parameters
layoutOdfPresentationLayoutThe 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
paragraphsIEnumerable<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
notesstringThe 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
typeOdfTransitionType
Returns
WithTransition(OdfTransitionType, double)
Sets the slide transition effect. 設定投影片切換效果。
public OdfSlideBuilder WithTransition(OdfTransitionType type, double durationPoints)
Parameters
typeOdfTransitionTypeThe transition type. / 切換類型。
durationPointsdoubleThe duration in points. / 持續時間,單位為點。
Returns
- OdfSlideBuilder
The current builder instance. / 目前 builder 執行個體。