Class EllipseShape

EllipseShape class

楕円形を表します。

public class EllipseShape : RectangleShape

コンストラクター

名前説明
EllipseShape()の新しいインスタンスを初期化しますEllipseShapeclass.
EllipseShape(RectangleF)の新しいインスタンスを初期化しますEllipseShapeclass.

プロパティ

名前説明
override Bounds { get; }オブジェクトの境界を取得します。
override Center { get; }形状の中心を取得します。
override HasSegments { get; }形状にセグメントがあるかどうかを示す値を取得します。
LeftBottom { get; }左下の長方形の点を取得します.
LeftTop { get; }左上の長方形の点を取得します.
RectangleHeight { get; }長方形の高さを取得します。
RectangleWidth { get; }長方形の幅を取得します.
RightBottom { get; }右下の長方形の点を取得します.
RightTop { get; }右上の長方形ポイントを取得します。
override Segments { get; }形状セグメントを取得します。

メソッド

名前説明
override GetBounds(Matrix)オブジェクトの境界を取得します。
override GetBounds(Matrix, Pen)オブジェクトの境界を取得します。
override Transform(Matrix)指定された変換を形状に適用します。

この例では、新しいイメージを作成し、イメージ サーフェスで Figure と GraphicsPath を使用してさまざまな形状を描画します。

[C#]

//Image のインスタンスを作成する
using (Aspose.PSD.Image image = new Aspose.PSD.FileFormats.Psd.PsdImage(500, 500))
{
    // Graphics クラスのインスタンスを作成して初期化します
    Aspose.PSD.Graphics graphics = new Aspose.PSD.Graphics(image);

    // グラフィック サーフェスをクリアする
    graphics.Clear(Color.Wheat);

    // GraphicsPath クラスのインスタンスを作成します
    Aspose.PSD.GraphicsPath graphicspath = new Aspose.PSD.GraphicsPath();

    // Figure クラスのインスタンスを作成
    Aspose.PSD.Figure figure1 = new Aspose.PSD.Figure();

    // Figure オブジェクトに Shape を追加
    figure1.AddShape(new Aspose.PSD.Shapes.EllipseShape(new RectangleF(50, 50, 300, 300)));
    figure1.AddShape(new Aspose.PSD.Shapes.PieShape(new Rectangle(new Point(110, 110), new Size(200, 200)), 0, 90));

    // Figure クラスのインスタンスを作成
    Aspose.PSD.Figure figure2 = new Aspose.PSD.Figure();

    // Figure オブジェクトに Shape を追加
    figure2.AddShape(new Aspose.PSD.Shapes.ArcShape(new RectangleF(10, 10, 300, 300), 0, 45));
    figure2.AddShape(new Aspose.PSD.Shapes.PolygonShape(new[] { new PointF(150, 10), new PointF(150, 200), new PointF(250, 300), new PointF(350, 400) }, true));
    figure2.AddShape(new Aspose.PSD.Shapes.RectangleShape(new Rectangle(new Point(250, 250), new Size(200, 200))));

    //GraphicsPath に Figure オブジェクトを追加
    graphicspath.AddFigures(new[] { figure1, figure2 });

    //色が黒の Pen オブジェクトでパスを描画します
    graphics.DrawPath(new Pen(Aspose.PSD.Color.Black, 2), graphicspath);

    // エクスポート オプションを作成して初期化します。
    Aspose.PSD.ImageOptions.BmpOptions options = new Aspose.PSD.ImageOptions.BmpOptions();

    // すべての変更を保存します。
    image.Save("c:\\temp\\output.bmp", options);
}

関連項目