形状を追加

図形は PowerPoint の基本的な要素であり、コンテンツの構造化、重要なポイントの強調、視覚的な魅力の向上に役立ちます。 図形を効果的に使用することで、プレゼンターは情報を整理し、図を作成し、聴衆の注意を誘導することができます。 方向を示す矢印、テキスト ボックスの四角形、強調表示の円など、図形を使用すると、プレゼンテーションがより魅力的でプロフェッショナルなものになります。

IronPPTを使用することで、開発者はシームレスに図形を統合、修正することができ、PowerPointのスライドを完全にコントロールすることができます。 この柔軟性により、アイデアを効果的に伝え、永続的な影響を与える、ダイナミックで洗練されたプレゼンテーションが可能になります。

図形を追加するための5ステップコード

  • Shape shape = new Shape();
  • shape.Type = IronPPT.Enums.ShapeType.Triangle
  • shape.Width = 100;
  • shape.OutlineColor = Color.Black
  • shape.Position = (200, 200);

コードの説明

To add a new shape to our empty PowerPoint presentation, we start by creating a new Shape object using the constructor. Next, we define the type of shape we want to create by modifying the Type property and assigning it one of the values from the ShapeType enum. For example, to create a triangle, we would set the Type to ShapeType.Triangle. After that, we can set the dimensions of the shape by assigning an integer value to the Width property, which specifies the shape's width. To customize the appearance of the shape, we can adjust the OutlineColor property; この例では、色を黒に設定します。 最後に、x 座標と y 座標を指定してスライド上に図形を配置します。この場合は (200, 200) に設定されます。 これにより、プレゼンテーション内の目的の場所に図形が配置されます。

IronPPTでスライドを管理する方法を学ぶ

準備はできましたか?
Nuget ダウンロード 3,607 | バージョン: 2025.12 リリース