Main Content

replace

クラス: mlreportgen.ppt.Picture
名前空間: mlreportgen.ppt

説明

pictureObj = replace(picture,replacementPicture) は、ある画像を他の画像に置換します。

すべて展開する

プレゼンテーション内の画像を置き換えます。

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

import mlreportgen.ppt.*
ppt = Presentation("myPictureReplacePresentation");
slide1 = add(ppt,"Blank");

mlreportgen.ppt.Picture オブジェクトを作成します。

plane = Picture(which("b747.jpg"));
plane.X = "1in";
plane.Y = "1in";
plane.Width = "5in";
plane.Height = "2in";

スライドに画像を追加します。

add(slide1,plane);

2 つ目の画像を作成します。

peppers = Picture(which("peppers.png"));
peppers.X = "1in";
peppers.Y = "1in";
peppers.Width = "3in";
peppers.Height = "3in";

飛行機の画像をピーマンの画像に置き換えます。

replace(plane,peppers);

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

close(ppt);
rptview(ppt);

入力引数

すべて展開する

置換する画像。mlreportgen.ppt.Picture オブジェクトとして指定します。

置換項目として使用する画像。mlreportgen.ppt.Picture オブジェクトとして指定します。

出力引数

すべて展開する

画像。mlreportgen.ppt.Picture オブジェクトとして返されます。

バージョン履歴

R2015b で導入