メインコンテンツ

mlreportgen.ppt.FontSize クラス

名前空間: mlreportgen.ppt

説明

プレゼンテーションのテキストのフォント サイズを指定する書式。

mlreportgen.ppt.FontSize クラスは handle クラスです。

クラス属性

HandleCompatible
true
ConstructOnLoad
true

クラス属性の詳細については、クラスの属性を参照してください。

作成

説明

fontSizeObj = mlreportgen.ppt.FontSize は、12 ポイントのフォントを作成します。

fontSizeObj = mlreportgen.ppt.FontSize(value) は、Value プロパティを value で指定されたフォント サイズに設定します。

プロパティ

すべて展開する

フォント サイズ。数値とそれに続く測定単位として書式設定された文字ベクトルまたは string スカラーとして指定します。たとえば、"12pt" は 12 ポイントを指定します。測定単位には次のいずれかの略語を使用します。

  • "px" — ピクセル

  • "cm" — センチメートル

  • "in" — インチ

  • "mm" — ミリメートル

  • "pc" — パイカ

  • "pt" — ポイント

例: "12pt"

属性:

GetAccess
public
SetAccess
public
NonCopyable
true

データ型: char | string

タグ。文字ベクトルまたは string スカラーとして指定します。PPT API は、このオブジェクトを作成するときに、セッション固有タグを生成します。生成されるタグの形式は CLASS:ID という形式です。ここで、CLASS はオブジェクト クラスです。ID はオブジェクトの Id プロパティの値です。この値を使用すると、ドキュメントの生成中に問題が発生した箇所を容易に特定できるようになります。

属性:

GetAccess
public
SetAccess
public
NonCopyable
true

データ型: char | string

オブジェクト識別子。文字ベクトルまたは string スカラーとして指定します。PPT API は、ドキュメント要素オブジェクトの作成時にセッション固有識別子を生成します。Id には独自の値を指定できます。

属性:

GetAccess
public
SetAccess
public
NonCopyable
true

データ型: char | string

すべて折りたたむ

プレゼンテーションを作成します。

import mlreportgen.ppt.*

ppt = Presentation("myFontSizePresentation.pptx");
open(ppt);
slide = add(ppt,"Title and Content");

段落を作成し、大きなフォント サイズでテキストを追加します。

p = Paragraph();

tWarning = Text("WARNING:");
tWarning.Style = {FontSize("40pt"),Bold(true),FontColor("red")};
append(p,tWarning);

tDesc = Text(" Unplug the machine before doing the next steps.");
append(p,tDesc);

スライドに段落を追加します。

replace(slide,"Content",p);

プレゼンテーションを閉じて表示します。

close(ppt);
rptview(ppt);

Sample slide with the text "WARNING: Unplug the machine before doing the next steps." The word WARNING is capitalized and displays in red, as well as larger than the other body text.

バージョン履歴

R2015b で導入