Class Graphics

Class Graphics

名称: Aspose.Imaging アセンション: Aspose.Imaging.dll (25.4.0)

現在のセットで使用されているグラフィックエンジンに従ってグラフィックを表します。

public sealed class Graphics

Inheritance

object Graphics

相続人

object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

この例では、画像表面に原始的な形状を作成するためにグラフィッククラスを使用します. 操作を示すために、例は PNG 形式の新しい画像を作成し、画像表面に原始的な形状を描き、グラフィッククラスが示すドラッグ方法を使用します。

//Creates an instance of FileStream
                                                                                                                                                                                                                                                                using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                    //Create an instance of PngOptions and set its various properties
                                                                                                                                                                                                                                                                    Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();

                                                                                                                                                                                                                                                                    //Set the Source for PngOptions
                                                                                                                                                                                                                                                                    pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);

                                                                                                                                                                                                                                                                    //Create an instance of Image 
                                                                                                                                                                                                                                                                    using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
                                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                                        //Create and initialize an instance of Graphics class
                                                                                                                                                                                                                                                                        Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                                                                                                                                                                        //Clear Graphics surface
                                                                                                                                                                                                                                                                        graphics.Clear(Aspose.Imaging.Color.Wheat);

                                                                                                                                                                                                                                                                        //Draw an Arc by specifying the Pen object having Black color, 
                                                                                                                                                                                                                                                                        //a Rectangle surrounding the Arc, Start Angle and Sweep Angle
                                                                                                                                                                                                                                                                        graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);

                                                                                                                                                                                                                                                                        //Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
                                                                                                                                                                                                                                                                        graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));

                                                                                                                                                                                                                                                                        //Draw a Curve by specifying the Pen object having Green color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });

                                                                                                                                                                                                                                                                        //Draw an Ellipse using the Pen object and a surrounding Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));

                                                                                                                                                                                                                                                                        //Draw a Line 
                                                                                                                                                                                                                                                                        graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));

                                                                                                                                                                                                                                                                        //Draw a Pie segment
                                                                                                                                                                                                                                                                        graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);

                                                                                                                                                                                                                                                                        //Draw a Polygon by specifying the Pen object having Red color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });

                                                                                                                                                                                                                                                                        //Draw a Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));

                                                                                                                                                                                                                                                                        //Create a SolidBrush object and set its various properties
                                                                                                                                                                                                                                                                        Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
                                                                                                                                                                                                                                                                        brush.Color = Color.Purple;
                                                                                                                                                                                                                                                                        brush.Opacity = 100;

                                                                                                                                                                                                                                                                        //Draw a String using the SolidBrush object and Font, at specific Point
                                                                                                                                                                                                                                                                        graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));

                                                                                                                                                                                                                                                                        // save all changes.
                                                                                                                                                                                                                                                                        image.Save();
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                }

Constructors

Graphics(Image)

Aspose.Imaging.Graphicsクラスの新しい例を開始します。

public Graphics(Image sourceImage)

Parameters

sourceImage Image

ソース画像です。

Properties

Clip

受信またはクリップ地域を設定します。

public Region Clip { get; set; }

不動産価値

Region

CompositingQuality

コンポーネントの品質を取得または設定します。

public CompositingQuality CompositingQuality { get; set; }

不動産価値

CompositingQuality

デピックス

この Aspose.Imaging.Graphics の垂直解像度を取得します。

public float DpiX { get; }

不動産価値

float

デビュー

この Aspose.Imaging.Graphics の垂直解像度を取得します。

public float DpiY { get; }

不動産価値

float

Image

イメージを得る。

public Image Image { get; }

不動産価値

Image

InterpolationMode

入力またはインターポレーションモードを設定します。

public InterpolationMode InterpolationMode { get; set; }

不動産価値

InterpolationMode

IsInBeginUpdateCall

グラフィックが BeginUpdate 通話状態にあるかどうかを示す値を取得します。

public bool IsInBeginUpdateCall { get; }

不動産価値

bool

PageScale

この Aspose.Imaging.Graphics のための世界ユニットとページユニットの間のスケールを取得または設定します。

public float PageScale { get; set; }

不動産価値

float

PageUnit

この Aspose.Imaging.Graphics でページのコーディネートに使用される測定ユニットを取得または設定します。

public GraphicsUnit PageUnit { get; set; }

不動産価値

GraphicsUnit

PaintableImageOptions

画像のオプションを取得または設定し、塗装可能なバクター画像を作成するために使用されます。

public ImageOptionsBase PaintableImageOptions { get; set; }

不動産価値

ImageOptionsBase

SmoothingMode

リフレッシュモードを取得または設定します。

public SmoothingMode SmoothingMode { get; set; }

不動産価値

SmoothingMode

TextRenderingHint

テキストを表示するヒントを取得または設定します。

public TextRenderingHint TextRenderingHint { get; set; }

不動産価値

TextRenderingHint

Transform

この Aspose.Imaging.Graphics のための地質世界変革のコピーを取得または設定します。

public Matrix Transform { get; set; }

不動産価値

Matrix

Methods

BeginUpdate()

次に適用されるグラフィック効果は、直ちに適用されず、EndUpdateは、すべての効果を同時に適用するようになります。

public void BeginUpdate()

Remarks

BeginUpdate が呼ばれた後の効果は、 EndUpdate が呼ばれていない場合に適用されません。

Clear(Color)

指定された色を使用してグラフィック表面を掃除します。

public void Clear(Color color)

Parameters

color Color

色はグラフィックの表面を明るくします。

Examples

これらの例は、グラフィックパスとグラフィッククラスを使用して画像表面上の数字を作成し、操作します。 例は、新しい画像(タイプのティフ)を作成し、表面をクリアし、グラフィックパスクラスの助けを借りてルートを引き出します。

//Create an instance of FileStream
                                                                                                                                                                                                                                                                                                                                             using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.tiff", System.IO.FileMode.Create))
                                                                                                                                                                                                                                                                                                                                             {
                                                                                                                                                                                                                                                                                                                                                 //Create an instance of TiffOptions and set its various properties
                                                                                                                                                                                                                                                                                                                                                 Aspose.Imaging.ImageOptions.TiffOptions tiffOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                                                                                                                                                                                                                                                                                 //Set the source for the instance of ImageOptions
                                                                                                                                                                                                                                                                                                                                                 tiffOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);

                                                                                                                                                                                                                                                                                                                                                 //Create an instance of Image 
                                                                                                                                                                                                                                                                                                                                                 using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(tiffOptions, 500, 500))
                                                                                                                                                                                                                                                                                                                                                 {
                                                                                                                                                                                                                                                                                                                                                     //Create and initialize an instance of Graphics class
                                                                                                                                                                                                                                                                                                                                                     Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                                                                                                                                                                                                                                                     //Clear Graphics surface
                                                                                                                                                                                                                                                                                                                                                     graphics.Clear(Color.Wheat);

                                                                                                                                                                                                                                                                                                                                                     //Create an instance of GraphicsPath class
                                                                                                                                                                                                                                                                                                                                                     Aspose.Imaging.GraphicsPath graphicspath = new Aspose.Imaging.GraphicsPath();

                                                                                                                                                                                                                                                                                                                                                     //Create an instance of Figure class
                                                                                                                                                                                                                                                                                                                                                     Aspose.Imaging.Figure figure = new Aspose.Imaging.Figure();

                                                                                                                                                                                                                                                                                                                                                     //Add Shapes to Figure object
                                                                                                                                                                                                                                                                                                                                                     figure.AddShape(new Aspose.Imaging.Shapes.RectangleShape(new Aspose.Imaging.RectangleF(10f, 10f, 300f, 300f)));
                                                                                                                                                                                                                                                                                                                                                     figure.AddShape(new Aspose.Imaging.Shapes.EllipseShape(new Aspose.Imaging.RectangleF(50f, 50f, 300f, 300f)));
                                                                                                                                                                                                                                                                                                                                                     figure.AddShape(new Aspose.Imaging.Shapes.PieShape(new Aspose.Imaging.RectangleF(new Aspose.Imaging.PointF(250f, 250f), new Aspose.Imaging.SizeF(200f, 200f)), 0f, 45f));

                                                                                                                                                                                                                                                                                                                                                     //Add Figure object to GraphicsPath
                                                                                                                                                                                                                                                                                                                                                     graphicspath.AddFigure(figure);

                                                                                                                                                                                                                                                                                                                                                     //Draw path with Pen object of color Black
                                                                                                                                                                                                                                                                                                                                                     graphics.DrawPath(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), graphicspath);

                                                                                                                                                                                                                                                                                                                                                     // save all changes.
                                                                                                                                                                                                                                                                                                                                                     image.Save();
                                                                                                                                                                                                                                                                                                                                                 }
                                                                                                                                                                                                                                                                                                                                             }

この例では、画像表面に原始的な形状を作成するためにグラフィッククラスを使用します. 操作を示すために、例は PNG 形式の新しい画像を作成し、画像表面に原始的な形状を描き、グラフィッククラスが示すドラッグ方法を使用します。

//Creates an instance of FileStream
                                                                                                                                                                                                                                                                using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                    //Create an instance of PngOptions and set its various properties
                                                                                                                                                                                                                                                                    Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();

                                                                                                                                                                                                                                                                    //Set the Source for PngOptions
                                                                                                                                                                                                                                                                    pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);

                                                                                                                                                                                                                                                                    //Create an instance of Image 
                                                                                                                                                                                                                                                                    using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
                                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                                        //Create and initialize an instance of Graphics class
                                                                                                                                                                                                                                                                        Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                                                                                                                                                                        //Clear Graphics surface
                                                                                                                                                                                                                                                                        graphics.Clear(Aspose.Imaging.Color.Wheat);

                                                                                                                                                                                                                                                                        //Draw an Arc by specifying the Pen object having Black color, 
                                                                                                                                                                                                                                                                        //a Rectangle surrounding the Arc, Start Angle and Sweep Angle
                                                                                                                                                                                                                                                                        graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);

                                                                                                                                                                                                                                                                        //Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
                                                                                                                                                                                                                                                                        graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));

                                                                                                                                                                                                                                                                        //Draw a Curve by specifying the Pen object having Green color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });

                                                                                                                                                                                                                                                                        //Draw an Ellipse using the Pen object and a surrounding Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));

                                                                                                                                                                                                                                                                        //Draw a Line 
                                                                                                                                                                                                                                                                        graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));

                                                                                                                                                                                                                                                                        //Draw a Pie segment
                                                                                                                                                                                                                                                                        graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);

                                                                                                                                                                                                                                                                        //Draw a Polygon by specifying the Pen object having Red color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });

                                                                                                                                                                                                                                                                        //Draw a Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));

                                                                                                                                                                                                                                                                        //Create a SolidBrush object and set its various properties
                                                                                                                                                                                                                                                                        Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
                                                                                                                                                                                                                                                                        brush.Color = Color.Purple;
                                                                                                                                                                                                                                                                        brush.Opacity = 100;

                                                                                                                                                                                                                                                                        //Draw a String using the SolidBrush object and Font, at specific Point
                                                                                                                                                                                                                                                                        graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));

                                                                                                                                                                                                                                                                        // save all changes.
                                                                                                                                                                                                                                                                        image.Save();
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                }

DrawArc(フラット、フラット、フラット、フラット、フラット、フラット)

エリプスの一部を表す弓を引き出し、一組の座標、幅、高さによって指定されます。

public void DrawArc(Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle)

Parameters

pen Pen

Aspose.Imaging.Pen は、弓の色、幅、スタイルを決定します。

x float

直角の左上角のXコーディネートは、エリプスを定義します。

y float

直角の右上角のYコーディネートは、エリプスを定義します。

width float

直角の幅は、エリプスを定義する。

height float

直角の高さは、エリプスを定義する。

startAngle float

グレードの角度は、X軸から弓の出発点まで時計的に測定されます。

sweepAngle float

<コードクラス=“paramref”>startAngle’ パラメーターから グレードの角度を測定し、弓の点を終わらせる。

Exceptions

ArgumentNullException

pen’ is null.

DrawArc(フラット、フラット、フラット、フラット)

Aspose.Imaging.RectangleF構造によって指定されたエリプスの部分を表す弓を引き出します。

public void DrawArc(Pen pen, RectangleF rect, float startAngle, float sweepAngle)

Parameters

pen Pen

Aspose.Imaging.Pen は、弓の色、幅、スタイルを決定します。

rect RectangleF

Aspose.Imaging.RectangleF 構造は、エリプスの境界を定義します。

startAngle float

グレードの角度は、X軸から弓の出発点まで時計的に測定されます。

sweepAngle float

<コードクラス=“paramref”>startAngle’ パラメーターから グレードの角度を測定し、弓の点を終わらせる。

Exceptions

ArgumentNullException

pen’ is null

DrawArc(ペン、 int、 int、 int、 int、 int、 int)

エリプスの一部を表す弓を引き出し、一組の座標、幅、高さによって指定されます。

public void DrawArc(Pen pen, int x, int y, int width, int height, int startAngle, int sweepAngle)

Parameters

pen Pen

Aspose.Imaging.Pen は、弓の色、幅、スタイルを決定します。

x int

直角の左上角のXコーディネートは、エリプスを定義します。

y int

直角の右上角のYコーディネートは、エリプスを定義します。

width int

直角の幅は、エリプスを定義する。

height int

直角の高さは、エリプスを定義する。

startAngle int

グレードの角度は、X軸から弓の出発点まで時計的に測定されます。

sweepAngle int

<コードクラス=“paramref”>startAngle’ パラメーターから グレードの角度を測定し、弓の点を終わらせる。

Exceptions

ArgumentNullException

pen’ is null.

DrawArc(ペン、直角、フラット、フラット)

Aspose.Imaging.Rectangle の構造によって指定されたエリプスの部分を表す弓を引き出します。

public void DrawArc(Pen pen, Rectangle rect, float startAngle, float sweepAngle)

Parameters

pen Pen

Aspose.Imaging.Pen は、弓の色、幅、スタイルを決定します。

rect Rectangle

Aspose.Imaging.RectangleF 構造は、エリプスの境界を定義します。

startAngle float

グレードの角度は、X軸から弓の出発点まで時計的に測定されます。

sweepAngle float

<コードクラス=“paramref”>startAngle’ パラメーターから グレードの角度を測定し、弓の点を終わらせる。

Examples

この例では、画像表面に原始的な形状を作成するためにグラフィッククラスを使用します. 操作を示すために、例は PNG 形式の新しい画像を作成し、画像表面に原始的な形状を描き、グラフィッククラスが示すドラッグ方法を使用します。

//Creates an instance of FileStream
                                                                                                                                                                                                                                                                using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                    //Create an instance of PngOptions and set its various properties
                                                                                                                                                                                                                                                                    Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();

                                                                                                                                                                                                                                                                    //Set the Source for PngOptions
                                                                                                                                                                                                                                                                    pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);

                                                                                                                                                                                                                                                                    //Create an instance of Image 
                                                                                                                                                                                                                                                                    using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
                                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                                        //Create and initialize an instance of Graphics class
                                                                                                                                                                                                                                                                        Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                                                                                                                                                                        //Clear Graphics surface
                                                                                                                                                                                                                                                                        graphics.Clear(Aspose.Imaging.Color.Wheat);

                                                                                                                                                                                                                                                                        //Draw an Arc by specifying the Pen object having Black color, 
                                                                                                                                                                                                                                                                        //a Rectangle surrounding the Arc, Start Angle and Sweep Angle
                                                                                                                                                                                                                                                                        graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);

                                                                                                                                                                                                                                                                        //Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
                                                                                                                                                                                                                                                                        graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));

                                                                                                                                                                                                                                                                        //Draw a Curve by specifying the Pen object having Green color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });

                                                                                                                                                                                                                                                                        //Draw an Ellipse using the Pen object and a surrounding Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));

                                                                                                                                                                                                                                                                        //Draw a Line 
                                                                                                                                                                                                                                                                        graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));

                                                                                                                                                                                                                                                                        //Draw a Pie segment
                                                                                                                                                                                                                                                                        graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);

                                                                                                                                                                                                                                                                        //Draw a Polygon by specifying the Pen object having Red color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });

                                                                                                                                                                                                                                                                        //Draw a Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));

                                                                                                                                                                                                                                                                        //Create a SolidBrush object and set its various properties
                                                                                                                                                                                                                                                                        Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
                                                                                                                                                                                                                                                                        brush.Color = Color.Purple;
                                                                                                                                                                                                                                                                        brush.Opacity = 100;

                                                                                                                                                                                                                                                                        //Draw a String using the SolidBrush object and Font, at specific Point
                                                                                                                                                                                                                                                                        graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));

                                                                                                                                                                                                                                                                        // save all changes.
                                                                                                                                                                                                                                                                        image.Save();
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                }

Exceptions

ArgumentNullException

pen’ is null.

DrawBezier(フラット、フラット、フラット、フラット、フラット、フラット)

ポイントを表すコーディネートの4つの注文されたカップルによって定義されたベジアのスプレーを描く。

public void DrawBezier(Pen pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)

Parameters

pen Pen

Aspose.Imaging.Pen は、曲線の色、幅、スタイルを決定します。

x1 float

曲線の出発点のXコーディネート。

y1 float

曲線の出発点のYコーディネート。

x2 float

曲線の最初のコントロールポイントのXコーディネート。

y2 float

曲線の最初のコントロールポイントのYコーディネート。

x3 float

曲線の2番目のコントロールポイントのXコーディネート

y3 float

曲線の2番目のコントロールポイントのyコーディネート。

x4 float

曲線の終点のXコーディネート。

y4 float

曲線の終点点のYコーディネート

Exceptions

ArgumentNullException

pen’ is null.

DrawBezier(ペン、ポイントF、ポイントF、ポイントF)

4つの Aspose.Imaging.PointF 構造によって定義された Bézier spline を描きます。

public void DrawBezier(Pen pen, PointF pt1, PointF pt2, PointF pt3, PointF pt4)

Parameters

pen Pen

Aspose.Imaging.Pen は、曲線の色、幅、スタイルを決定します。

pt1 PointF

Aspose.Imaging.PointF 構造は、曲線の出発点を表しています。

pt2 PointF

Aspose.Imaging.PointF 構造は、曲線の最初のコントロールポイントを表しています。

pt3 PointF

Aspose.Imaging.PointF 構造は、曲線の第二のコントロールポイントを表しています。

pt4 PointF

Aspose.Imaging.PointF 構造は、曲線の終点を表しています。

Exceptions

ArgumentNullException

pen’ is null.

DrawBezier(ペン、ポイント、ポイント、ポイント)

4つの Aspose.Imaging.Point 構造によって定義された Bézier spline を描きます。

public void DrawBezier(Pen pen, Point pt1, Point pt2, Point pt3, Point pt4)

Parameters

pen Pen

Aspose.Imaging.Pen 構造は、曲線の色、幅、スタイルを決定します。

pt1 Point

Aspose.Imaging.Point 構造は、曲線の出発点を表しています。

pt2 Point

Aspose.Imaging.Point 構造は、曲線の最初のコントロールポイントを表しています。

pt3 Point

Aspose.Imaging.Point 構造は、曲線の第二のコントロールポイントを表しています。

pt4 Point

Aspose.Imaging.Point 構造は、曲線の終点を表しています。

Examples

この例では、画像表面に原始的な形状を作成するためにグラフィッククラスを使用します. 操作を示すために、例は PNG 形式の新しい画像を作成し、画像表面に原始的な形状を描き、グラフィッククラスが示すドラッグ方法を使用します。

//Creates an instance of FileStream
                                                                                                                                                                                                                                                                using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                    //Create an instance of PngOptions and set its various properties
                                                                                                                                                                                                                                                                    Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();

                                                                                                                                                                                                                                                                    //Set the Source for PngOptions
                                                                                                                                                                                                                                                                    pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);

                                                                                                                                                                                                                                                                    //Create an instance of Image 
                                                                                                                                                                                                                                                                    using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
                                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                                        //Create and initialize an instance of Graphics class
                                                                                                                                                                                                                                                                        Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                                                                                                                                                                        //Clear Graphics surface
                                                                                                                                                                                                                                                                        graphics.Clear(Aspose.Imaging.Color.Wheat);

                                                                                                                                                                                                                                                                        //Draw an Arc by specifying the Pen object having Black color, 
                                                                                                                                                                                                                                                                        //a Rectangle surrounding the Arc, Start Angle and Sweep Angle
                                                                                                                                                                                                                                                                        graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);

                                                                                                                                                                                                                                                                        //Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
                                                                                                                                                                                                                                                                        graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));

                                                                                                                                                                                                                                                                        //Draw a Curve by specifying the Pen object having Green color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });

                                                                                                                                                                                                                                                                        //Draw an Ellipse using the Pen object and a surrounding Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));

                                                                                                                                                                                                                                                                        //Draw a Line 
                                                                                                                                                                                                                                                                        graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));

                                                                                                                                                                                                                                                                        //Draw a Pie segment
                                                                                                                                                                                                                                                                        graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);

                                                                                                                                                                                                                                                                        //Draw a Polygon by specifying the Pen object having Red color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });

                                                                                                                                                                                                                                                                        //Draw a Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));

                                                                                                                                                                                                                                                                        //Create a SolidBrush object and set its various properties
                                                                                                                                                                                                                                                                        Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
                                                                                                                                                                                                                                                                        brush.Color = Color.Purple;
                                                                                                                                                                                                                                                                        brush.Opacity = 100;

                                                                                                                                                                                                                                                                        //Draw a String using the SolidBrush object and Font, at specific Point
                                                                                                                                                                                                                                                                        graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));

                                                                                                                                                                                                                                                                        // save all changes.
                                                                                                                                                                                                                                                                        image.Save();
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                }

Exceptions

ArgumentNullException

pen’ is null.

DrawBeziers(ペン、ポイント[])

Aspose.Imaging.Point の構造の範囲から一連の Bézier splines を引き出します。

public void DrawBeziers(Pen pen, Point[] points)

Parameters

pen Pen

Aspose.Imaging.Pen は、曲線の色、幅、スタイルを決定します。

points Point ( )

Aspose.Imaging.Point の構造は、曲線を決定する点を表しています。

Exceptions

ArgumentNullException

pen’ is null.-or-points’ is null.

DrawBeziers(ペン、ポイントF[])

Aspose.Imaging.PointF 構造の範囲から一連の Bézier splines を引き出します。

public void DrawBeziers(Pen pen, PointF[] points)

Parameters

pen Pen

Aspose.Imaging.Pen は、曲線の色、幅、スタイルを決定します。

points PointF ( )

Aspose.Imaging.PointF の構造は、曲線を決定する点を表しています。

Exceptions

ArgumentNullException

pen’ is null.-or-points’ is null.

DrawClosedCurve(ペン、ポイントF[])

Aspose.Imaging.PointF の構造の範囲によって定義された閉鎖されたカルディナルのスプリングを導入します. この方法は、デフォルトの 0.5 と Aspose.Imaging.FillMode.Alternate の充電モードを使用します。

public void DrawClosedCurve(Pen pen, PointF[] points)

Parameters

pen Pen

Aspose.Imaging.Pen は、曲線の色、幅、高さを決定します。

points PointF ( )

Aspose.Imaging.PointF の構造が spline を定義します。

Exceptions

ArgumentNullException

pen’ is null.-or-points’ is null.

DrawClosedCurve(ペン、ポイントF( ), フラット)

Aspose.Imaging.PointF の構造の範囲によって定義された閉鎖されたカルディナルのスプリングを指定します. この方法では、デフォルトの Aspose.Imaging.FillMode.Alternate モードを使用します。

public void DrawClosedCurve(Pen pen, PointF[] points, float tension)

Parameters

pen Pen

Aspose.Imaging.Pen は、曲線の色、幅、高さを決定します。

points PointF ( )

Aspose.Imaging.PointF の構造が spline を定義します。

tension float

値は 0.0F 以上または同等で、曲線の電圧を指定します。

Exceptions

ArgumentNullException

pen’ is null.-or-points’ is null.

DrawClosedCurve(ペン、ポイント[])

Aspose.Imaging.Point の構造の範囲によって定義された閉鎖されたカルディナルのスプリングを導入します. この方法では、デフォルトの 0.5 と Aspose.Imaging.FillMode.Alternate の充電モードを使用します。

public void DrawClosedCurve(Pen pen, Point[] points)

Parameters

pen Pen

Aspose.Imaging.Pen は、曲線の色、幅、高さを決定します。

points Point ( )

Aspose.Imaging.Point の構造が spline を定義します。

Exceptions

ArgumentNullException

pen’ is null.-or-points’ is null.

DrawClosedCurve(ペン、ポイント( ), フラット)

Aspose.Imaging.Point の構造の範囲によって定義された閉鎖されたカーディナル スプリングを指定します. この方法では、デフォルトの Aspose.Imaging.FillMode.Alternate モードを使用します。

public void DrawClosedCurve(Pen pen, Point[] points, float tension)

Parameters

pen Pen

Aspose.Imaging.Pen は、曲線の色、幅、高さを決定します。

points Point ( )

Aspose.Imaging.Point の構造が spline を定義します。

tension float

値は 0.0F 以上または同等で、曲線の電圧を指定します。

Exceptions

ArgumentNullException

pen’ is null.-or-points’ is null.

DrawCurve(ペン、ポイントF[])

Aspose.Imaging.PointF 構造の特定の順序を介してカーディナルのスプリングを引き出します この方法は、0.5 のデフォルトストレッチを使用します。

public void DrawCurve(Pen pen, PointF[] points)

Parameters

pen Pen

Aspose.Imaging.Pen は、曲線の色、幅、高さを決定します。

points PointF ( )

Aspose.Imaging.PointF の構造が spline を定義します。

Exceptions

ArgumentNullException

pen’ is null.-or-points’ is null.

DrawCurve(ペン、ポイントF( ), フラット)

Aspose.Imaging.PointF 構造の特定の範囲を介して、特定の緊張を使用してカルディナルスプリンを引き出します。

public void DrawCurve(Pen pen, PointF[] points, float tension)

Parameters

pen Pen

Aspose.Imaging.Pen は、曲線の色、幅、高さを決定します。

points PointF ( )

Aspose.Imaging.PointF の構造は、曲線を定義する点を表しています。

tension float

値は 0.0F 以上または同等で、曲線の電圧を指定します。

Exceptions

ArgumentNullException

pen’ is null.-or-points’ is null.

DrawCurve(ペン、ポイントF( ), インタ、インタ)

Aspose.Imaging.PointF 構造の特定の順序を介して枢機卿のスプリンを引き出します。この方法では、0.5 のデフォルト電圧を使用します。

public void DrawCurve(Pen pen, PointF[] points, int offset, int numberOfSegments)

Parameters

pen Pen

Aspose.Imaging.Pen は、曲線の色、幅、高さを決定します。

points PointF ( )

Aspose.Imaging.PointF の構造が spline を定義します。

offset int

<コードクラス=“paramref”>ポイントのパラメーターの順序で最初の要素から曲線の出発点に切り替えます。

numberOfSegments int

曲線に含まれる出発点後のセグメントの数。

Exceptions

ArgumentNullException

pen’ is null.-or-points’ is null.

DrawCurve(ペン、ポイントF( ), int , int , float)

Aspose.Imaging.PointF 構造の特定の順序を介して、特定の緊張を使用して、カーディナルスプレーを引き出します。

public void DrawCurve(Pen pen, PointF[] points, int offset, int numberOfSegments, float tension)

Parameters

pen Pen

Aspose.Imaging.Pen は、曲線の色、幅、高さを決定します。

points PointF ( )

Aspose.Imaging.PointF の構造が spline を定義します。

offset int

<コードクラス=“paramref”>ポイントのパラメーターの順序で最初の要素から曲線の出発点に切り替えます。

numberOfSegments int

曲線に含まれる出発点後のセグメントの数。

tension float

値は 0.0F 以上または同等で、曲線の電圧を指定します。

Exceptions

ArgumentNullException

pen’ is null.-or-points’ is null.

DrawCurve(ペン、ポイント[])

Aspose.Imaging.Point 構造の特定の範囲を介して枢機卿のスプリンを引き出します。

public void DrawCurve(Pen pen, Point[] points)

Parameters

pen Pen

Aspose.Imaging.Pen は、曲線の色、幅、高さを決定します。

points Point ( )

Aspose.Imaging.Point の構造が spline を定義します。

Examples

この例では、画像表面に原始的な形状を作成するためにグラフィッククラスを使用します. 操作を示すために、例は PNG 形式の新しい画像を作成し、画像表面に原始的な形状を描き、グラフィッククラスが示すドラッグ方法を使用します。

//Creates an instance of FileStream
                                                                                                                                                                                                                                                                using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                    //Create an instance of PngOptions and set its various properties
                                                                                                                                                                                                                                                                    Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();

                                                                                                                                                                                                                                                                    //Set the Source for PngOptions
                                                                                                                                                                                                                                                                    pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);

                                                                                                                                                                                                                                                                    //Create an instance of Image 
                                                                                                                                                                                                                                                                    using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
                                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                                        //Create and initialize an instance of Graphics class
                                                                                                                                                                                                                                                                        Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                                                                                                                                                                        //Clear Graphics surface
                                                                                                                                                                                                                                                                        graphics.Clear(Aspose.Imaging.Color.Wheat);

                                                                                                                                                                                                                                                                        //Draw an Arc by specifying the Pen object having Black color, 
                                                                                                                                                                                                                                                                        //a Rectangle surrounding the Arc, Start Angle and Sweep Angle
                                                                                                                                                                                                                                                                        graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);

                                                                                                                                                                                                                                                                        //Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
                                                                                                                                                                                                                                                                        graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));

                                                                                                                                                                                                                                                                        //Draw a Curve by specifying the Pen object having Green color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });

                                                                                                                                                                                                                                                                        //Draw an Ellipse using the Pen object and a surrounding Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));

                                                                                                                                                                                                                                                                        //Draw a Line 
                                                                                                                                                                                                                                                                        graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));

                                                                                                                                                                                                                                                                        //Draw a Pie segment
                                                                                                                                                                                                                                                                        graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);

                                                                                                                                                                                                                                                                        //Draw a Polygon by specifying the Pen object having Red color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });

                                                                                                                                                                                                                                                                        //Draw a Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));

                                                                                                                                                                                                                                                                        //Create a SolidBrush object and set its various properties
                                                                                                                                                                                                                                                                        Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
                                                                                                                                                                                                                                                                        brush.Color = Color.Purple;
                                                                                                                                                                                                                                                                        brush.Opacity = 100;

                                                                                                                                                                                                                                                                        //Draw a String using the SolidBrush object and Font, at specific Point
                                                                                                                                                                                                                                                                        graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));

                                                                                                                                                                                                                                                                        // save all changes.
                                                                                                                                                                                                                                                                        image.Save();
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                }

Exceptions

ArgumentNullException

pen’ is null.-or-points’ is null.

DrawCurve(ペン、ポイント( ), フラット)

Aspose.Imaging.Point 構造の特定の順序を通じて、特定の緊張を使用して、カーディナルスプリンを引き出します。

public void DrawCurve(Pen pen, Point[] points, float tension)

Parameters

pen Pen

Aspose.Imaging.Pen は、曲線の色、幅、高さを決定します。

points Point ( )

Aspose.Imaging.Point の構造が spline を定義します。

tension float

値は 0.0F 以上または同等で、曲線の電圧を指定します。

Exceptions

ArgumentNullException

pen’ is null.-or-points’ is null.

DrawCurve(ペン、ポイント( ), int , int , float)

Aspose.Imaging.Point 構造の特定の順序を通じて、特定の緊張を使用して、カーディナルスプリンを引き出します。

public void DrawCurve(Pen pen, Point[] points, int offset, int numberOfSegments, float tension)

Parameters

pen Pen

Aspose.Imaging.Pen は、曲線の色、幅、高さを決定します。

points Point ( )

Aspose.Imaging.Point の構造が spline を定義します。

offset int

<コードクラス=“paramref”>ポイントのパラメーターの順序で最初の要素から曲線の出発点に切り替えます。

numberOfSegments int

曲線に含まれる出発点後のセグメントの数。

tension float

値は 0.0F 以上または同等で、曲線の電圧を指定します。

Exceptions

ArgumentNullException

pen’ is null.-or-points’ is null.

DrawEllipse(ペン、レクトンゲルフ)

Aspose.Imaging.RectangleFによって定義されたエリプスを引き出します。

public void DrawEllipse(Pen pen, RectangleF rect)

Parameters

pen Pen

Aspose.Imaging.Pen は、エリプスの色、幅、スタイルを決定します。

rect RectangleF

Aspose.Imaging.RectangleF 構造は、エリプスの境界を定義します。

Exceptions

ArgumentNullException

pen’ is null.

DrawEllipse(フラット、フラット、フラット、フラット)

線形直角によって定義されたエリプスは、一組の座標、高さ、幅によって定義されます。

public void DrawEllipse(Pen pen, float x, float y, float width, float height)

Parameters

pen Pen

Aspose.Imaging.Pen は、エリプスの色、幅、スタイルを決定します。

x float

エリプスを定義する結合直角の上左角のXコーディネート。

y float

エリプスを定義する結合直角の上左角のYコーディネート。

width float

エリプスを定義する結合直角の幅。

height float

エリプスを定義する結合直角の高さ。

Exceptions

ArgumentNullException

pen’ is null.

DrawEllipse(ペン、直角)

Aspose.Imaging.Rectangle の構造によって指定されたエリプスを引き出します。

public void DrawEllipse(Pen pen, Rectangle rect)

Parameters

pen Pen

Aspose.Imaging.Pen は、エリプスの色、幅、スタイルを決定します。

rect Rectangle

Aspose.Imaging.Rectangle の構造は、エリプスの境界線を定義します。

Examples

この例では、画像表面に原始的な形状を作成するためにグラフィッククラスを使用します. 操作を示すために、例は PNG 形式の新しい画像を作成し、画像表面に原始的な形状を描き、グラフィッククラスが示すドラッグ方法を使用します。

//Creates an instance of FileStream
                                                                                                                                                                                                                                                                using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                    //Create an instance of PngOptions and set its various properties
                                                                                                                                                                                                                                                                    Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();

                                                                                                                                                                                                                                                                    //Set the Source for PngOptions
                                                                                                                                                                                                                                                                    pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);

                                                                                                                                                                                                                                                                    //Create an instance of Image 
                                                                                                                                                                                                                                                                    using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
                                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                                        //Create and initialize an instance of Graphics class
                                                                                                                                                                                                                                                                        Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                                                                                                                                                                        //Clear Graphics surface
                                                                                                                                                                                                                                                                        graphics.Clear(Aspose.Imaging.Color.Wheat);

                                                                                                                                                                                                                                                                        //Draw an Arc by specifying the Pen object having Black color, 
                                                                                                                                                                                                                                                                        //a Rectangle surrounding the Arc, Start Angle and Sweep Angle
                                                                                                                                                                                                                                                                        graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);

                                                                                                                                                                                                                                                                        //Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
                                                                                                                                                                                                                                                                        graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));

                                                                                                                                                                                                                                                                        //Draw a Curve by specifying the Pen object having Green color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });

                                                                                                                                                                                                                                                                        //Draw an Ellipse using the Pen object and a surrounding Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));

                                                                                                                                                                                                                                                                        //Draw a Line 
                                                                                                                                                                                                                                                                        graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));

                                                                                                                                                                                                                                                                        //Draw a Pie segment
                                                                                                                                                                                                                                                                        graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);

                                                                                                                                                                                                                                                                        //Draw a Polygon by specifying the Pen object having Red color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });

                                                                                                                                                                                                                                                                        //Draw a Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));

                                                                                                                                                                                                                                                                        //Create a SolidBrush object and set its various properties
                                                                                                                                                                                                                                                                        Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
                                                                                                                                                                                                                                                                        brush.Color = Color.Purple;
                                                                                                                                                                                                                                                                        brush.Opacity = 100;

                                                                                                                                                                                                                                                                        //Draw a String using the SolidBrush object and Font, at specific Point
                                                                                                                                                                                                                                                                        graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));

                                                                                                                                                                                                                                                                        // save all changes.
                                                                                                                                                                                                                                                                        image.Save();
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                }

Exceptions

ArgumentNullException

pen’ is null.

DrawEllipse(ペン、 int、 int、 int、 int)

線形直角によって定義されたエリプスは、一組の座標、高さ、幅によって定義されます。

public void DrawEllipse(Pen pen, int x, int y, int width, int height)

Parameters

pen Pen

Aspose.Imaging.Pen は、エリプスの色、幅、スタイルを決定します。

x int

エリプスを定義する結合直角の上左角のXコーディネート。

y int

エリプスを定義する結合直角の上左角のYコーディネート。

width int

エリプスを定義する結合直角の幅。

height int

エリプスを定義する結合直角の高さ。

Exceptions

ArgumentNullException

pen’ is null.

DrawImage(イメージ、ポイントF)

指定された Aspose.Imaging.Graphics.Image を、その元の物理的なサイズを使用して、指定された場所で撮影します。

public void DrawImage(Image sourceImage, PointF point)

Parameters

sourceImage Image

引っ張る画像です。

point PointF

Aspose.Imaging.PointF 構造は、引き出された画像の左上角を表しています。

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImage(画像、フラット、フラット)

指定された Aspose.Imaging.Graphics.Image を、その元の物理的なサイズを使用して、指定された場所で撮影します。

public void DrawImage(Image sourceImage, float x, float y)

Parameters

sourceImage Image

引っ張る画像です。

x float

画像の左上角のXコーディネート。

y float

描かれた画像の左上角のYコーディネート。

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImage(イメージ、RectangleF)

指定された Aspose.Imaging.Graphics.Image を指定された位置と指定されたサイズで撮影します。

public void DrawImage(Image sourceImage, RectangleF rect)

Parameters

sourceImage Image

引っ張る画像です。

rect RectangleF

Aspose.Imaging.RectangleF 構造は、描かれた画像の位置とサイズを指定します。

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImage(画像、直角、グラフィックユニット)

指定された Aspose.Imaging.Graphics.Image を指定された位置と指定されたサイズで撮影します。

public void DrawImage(Image sourceImage, Rectangle rectDestination, GraphicsUnit graphicsUnit)

Parameters

sourceImage Image

引っ張る画像です。

rectDestination Rectangle

目的地の直角。

graphicsUnit GraphicsUnit

グラフィックユニット

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImage(画像、RectangleF、GraphicsUnit)

指定された Aspose.Imaging.Graphics.Image を指定された位置と指定されたサイズで撮影します。

public void DrawImage(Image sourceImage, RectangleF rectDestination, GraphicsUnit graphicsUnit)

Parameters

sourceImage Image

引っ張る画像です。

rectDestination RectangleF

目的地の直角。

graphicsUnit GraphicsUnit

グラフィックユニット

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImage(画像、Rectangle、GraphicsUnit、ImageAttributes)

指定された Aspose.Imaging.Graphics.Image を指定された位置と指定されたサイズで撮影します。

public void DrawImage(Image sourceImage, Rectangle rectDestination, GraphicsUnit graphicsUnit, ImageAttributes imageAttributes)

Parameters

sourceImage Image

引っ張る画像です。

rectDestination Rectangle

目的地の直角。

graphicsUnit GraphicsUnit

グラフィックユニット

imageAttributes ImageAttributes

イメージの特性

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImage(Image, RectangleF, グラフィックユニット, ImageAttributes)

指定された Aspose.Imaging.Graphics.Image を指定された位置と指定されたサイズで撮影します。

public void DrawImage(Image sourceImage, RectangleF rectDestination, GraphicsUnit graphicsUnit, ImageAttributes imageAttributes)

Parameters

sourceImage Image

引っ張る画像です。

rectDestination RectangleF

引っ張る目的地の直角。

graphicsUnit GraphicsUnit

グラフィックユニット

imageAttributes ImageAttributes

イメージの特性

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImage(画像、Rectangle、Rectangle、GraphicsUnit)

指定された Aspose.Imaging.Graphics.Image を指定された位置と指定されたサイズで撮影します。

public void DrawImage(Image sourceImage, Rectangle rectSource, Rectangle rectDestination, GraphicsUnit graphicsUnit)

Parameters

sourceImage Image

引っ張る画像です。

rectSource Rectangle

正方形の源。

rectDestination Rectangle

右の目的地。

graphicsUnit GraphicsUnit

グラフィックユニット

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImage(画像、RectangleF、RectangleF、GraphicsUnit)

指定された Aspose.Imaging.Graphics.Image を指定された位置と指定されたサイズで撮影します。

public void DrawImage(Image sourceImage, RectangleF rectSource, RectangleF rectDestination, GraphicsUnit graphicsUnit)

Parameters

sourceImage Image

引っ張る画像です。

rectSource RectangleF

正方形の源。

rectDestination RectangleF

右の目的地。

graphicsUnit GraphicsUnit

グラフィックユニット

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImage(Image, Rectangle, Rectangle, グラフィックユニット, ImageAttributes)

指定された Aspose.Imaging.Graphics.Image を指定された位置と指定されたサイズで撮影します。

public void DrawImage(Image sourceImage, Rectangle rectSource, Rectangle rectDestination, GraphicsUnit graphicsUnit, ImageAttributes imageAttributes)

Parameters

sourceImage Image

引っ張る画像です。

rectSource Rectangle

正方形の源。

rectDestination Rectangle

右の目的地。

graphicsUnit GraphicsUnit

グラフィックユニット

imageAttributes ImageAttributes

イメージの特性

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImage(Image, RectangleF, RectangleF, グラフィックユニット, ImageAttributes)

指定された Aspose.Imaging.Graphics.Image を指定された位置と指定されたサイズで撮影します。

public void DrawImage(Image sourceImage, RectangleF rectSource, RectangleF rectDestination, GraphicsUnit graphicsUnit, ImageAttributes imageAttributes)

Parameters

sourceImage Image

引っ張る画像です。

rectSource RectangleF

源の直角。

rectDestination RectangleF

目的地の直角。

graphicsUnit GraphicsUnit

使用するグラフィックユニット

imageAttributes ImageAttributes

画像は使える。

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImage(イメージ、ポイント[])

指定された位置および指定されたサイズで指定された image’ の指定された部分を抽出します。

public void DrawImage(Image image, Point[] destPoints)

Parameters

image Image

描くイメージです。

destPoints Point ( )

パラレログラムを定義する3つのポイントF構造の連続。

DrawImage(イメージ、ポイント( ), レクトアングル)

指定された位置および指定されたサイズで指定された image’ の指定された部分を抽出します。

public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect)

Parameters

image Image

描くイメージです。

destPoints Point ( )

パラレログラムを定義する3つのポイントF構造の連続。

srcRect Rectangle

源の直角。

DrawImage(イメージ、ポイント( ), グラフィック、グラフィックユニット)

指定された位置および指定されたサイズで指定された image’ の指定された部分を抽出します。

public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect, GraphicsUnit srcUnit)

Parameters

image Image

描くイメージです。

destPoints Point ( )

パラレログラムを定義する3つのポイントF構造の連続。

srcRect Rectangle

源の直角。

srcUnit GraphicsUnit

測定ユニット

DrawImage(イメージ、ポイント( ), レクトアンゲル, グラフィックユニット, ImageAttributes)

指定された位置および指定されたサイズで指定された image’ の指定された部分を抽出します。

public void DrawImage(Image image, Point[] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttributes)

Parameters

image Image

描くイメージです。

destPoints Point ( )

パラレログラムを定義する3つのポイントF構造の連続。

srcRect Rectangle

源の直角。

srcUnit GraphicsUnit

測定ユニット

imageAttributes ImageAttributes

イメージの特性

DrawImage(イメージ、ポイントF[])

指定された位置および指定されたサイズで指定された image’ の指定された部分を抽出します。

public void DrawImage(Image image, PointF[] destPoints)

Parameters

image Image

描くイメージです。

destPoints PointF ( )

パラレログラムを定義する3つのポイントF構造の連続。

Exceptions

ArgumentNullException

イメージ

DrawImage(イメージ、ポイントF( ), ・RectangleF)

指定された位置および指定されたサイズで指定された image’ の指定された部分を抽出します。

public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect)

Parameters

image Image

描くイメージです。

destPoints PointF ( )

パラレログラムを定義する3つのポイントF構造の連続。

srcRect RectangleF

源の直角。

DrawImage(イメージ、ポイントF( ), グラフィック グラフィック グラフィック)

指定された位置および指定されたサイズで指定された image’ の指定された部分を抽出します。

public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect, GraphicsUnit srcUnit)

Parameters

image Image

描くイメージです。

destPoints PointF ( )

パラレログラムを定義する3つのポイントF構造の連続。

srcRect RectangleF

源の直角。

srcUnit GraphicsUnit

測定ユニット

DrawImage(イメージ、ポイントF( ), RectangleF, グラフィックユニット, ImageAttributes)

指定された位置および指定されたサイズで指定された image’ の指定された部分を抽出します。

public void DrawImage(Image image, PointF[] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttributes)

Parameters

image Image

描くイメージです。

destPoints PointF ( )

パラレログラムを定義する3つのポイントF構造の連続。

srcRect RectangleF

源の直角。

srcUnit GraphicsUnit

測定ユニット

imageAttributes ImageAttributes

イメージの特性

DrawImage(フラット、フラット、フラット、フラット)

指定された Aspose.Imaging.Graphics.Image を指定された位置と指定されたサイズで撮影します。

public void DrawImage(Image sourceImage, float x, float y, float width, float height)

Parameters

sourceImage Image

引っ張る画像です。

x float

画像の左上角のXコーディネート。

y float

描かれた画像の左上角のYコーディネート。

width float

描かれた画像の幅。

height float

描かれた画像の高さ

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImage(イメージ、ポイント)

指定された Aspose.Imaging.Graphics.Image を、その元の物理的なサイズを使用して、指定された場所で撮影します。

public void DrawImage(Image sourceImage, Point point)

Parameters

sourceImage Image

引っ張る画像です。

point Point

Aspose.Imaging.Point 構造は、引き出された画像の左上角の位置を表しています。

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImage(イメージ、 int、 int)

指定された画像を、その元の物理的なサイズを使用して、コーディネートカップルによって指定された場所で撮影します。

public void DrawImage(Image sourceImage, int x, int y)

Parameters

sourceImage Image

引っ張る画像です。

x int

画像の左上角のXコーディネート。

y int

描かれた画像の左上角のYコーディネート。

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImage(画像、直角)

指定された Aspose.Imaging.Graphics.Image を指定された位置と指定されたサイズで撮影します。

public void DrawImage(Image sourceImage, Rectangle rect)

Parameters

sourceImage Image

引っ張る画像です。

rect Rectangle

Aspose.Imaging.Rectangle 構造は、描かれた画像の位置とサイズを指定します。

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImage(イメージ、 int、 int、 int、 int)

指定された Aspose.Imaging.Graphics.Image を指定された位置と指定されたサイズで撮影します。

public void DrawImage(Image sourceImage, int x, int y, int width, int height)

Parameters

sourceImage Image

引っ張る画像です。

x int

画像の左上角のXコーディネート。

y int

描かれた画像の左上角のYコーディネート。

width int

描かれた画像の幅。

height int

描かれた画像の高さ

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImageUnscaled(イメージ、ポイント)

特定の場所でその元の物理的なサイズを使用して特定の画像を描く。

public void DrawImageUnscaled(Image sourceImage, Point point)

Parameters

sourceImage Image

引っ張る画像です。

point Point

Aspose.Imaging.Point 構造は、引き出された画像の左上角を指定します。

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImageUnscaled(イメージ、 int、 int)

指定された画像は、コルダードカップルによって指定された位置にその元の物理的なサイズを使用して撮影します。

public void DrawImageUnscaled(Image sourceImage, int x, int y)

Parameters

sourceImage Image

引っ張る画像です。

x int

画像の左上角のXコーディネート。

y int

描かれた画像の左上角のYコーディネート。

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImageUnscaled(画像、直角)

特定の場所でその元の物理的なサイズを使用して特定の画像を描く。

public void DrawImageUnscaled(Image sourceImage, Rectangle rect)

Parameters

sourceImage Image

引っ張る画像です。

rect Rectangle

Aspose.Imaging.Rectangle that specifies the upper-left corner of the drawn image. The X and Y properties of the rectangle specifies the upper-left corner. 幅と高さの特性は無視されます。

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImageUnscaled(イメージ、 int、 int、 int、 int)

特定の場所でその元の物理的なサイズを使用して特定の画像を描く。

public void DrawImageUnscaled(Image sourceImage, int x, int y, int width, int height)

Parameters

sourceImage Image

引っ張る画像です。

x int

画像の左上角のXコーディネート。

y int

描かれた画像の左上角のYコーディネート。

width int

パラメーターは使えません。

height int

パラメーターは使えません。

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawImageUnscaledAndClipped(画像、直角)

スケールなしで指定された画像を引き出し、必要に応じて指定された直角に合うようにクリップします。

public void DrawImageUnscaledAndClipped(Image sourceImage, Rectangle rect)

Parameters

sourceImage Image

引っ張る画像です。

rect Rectangle

Aspose.Imaging.Rectangle で画像を描く。

Exceptions

ArgumentNullException

sourceImage’ is null.

DrawLine(ペン、ポイント、ポイント)

2つの Aspose.Imaging.Point 構造を結びつけるラインを引き出します。

public void DrawLine(Pen pen, Point point1, Point point2)

Parameters

pen Pen

Aspose.Imaging.Pen は、ラインの色、幅、スタイルを決定します。

point1 Point

Aspose.Imaging.Point 構造は、最初に接続するポイントを表します。

point2 Point

Aspose.Imaging.Point 構造は、接続するための第 2 ポイントを表します。

Examples

この例では、画像表面に原始的な形状を作成するためにグラフィッククラスを使用します. 操作を示すために、例は PNG 形式の新しい画像を作成し、画像表面に原始的な形状を描き、グラフィッククラスが示すドラッグ方法を使用します。

//Creates an instance of FileStream
                                                                                                                                                                                                                                                                using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                    //Create an instance of PngOptions and set its various properties
                                                                                                                                                                                                                                                                    Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();

                                                                                                                                                                                                                                                                    //Set the Source for PngOptions
                                                                                                                                                                                                                                                                    pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);

                                                                                                                                                                                                                                                                    //Create an instance of Image 
                                                                                                                                                                                                                                                                    using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
                                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                                        //Create and initialize an instance of Graphics class
                                                                                                                                                                                                                                                                        Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                                                                                                                                                                        //Clear Graphics surface
                                                                                                                                                                                                                                                                        graphics.Clear(Aspose.Imaging.Color.Wheat);

                                                                                                                                                                                                                                                                        //Draw an Arc by specifying the Pen object having Black color, 
                                                                                                                                                                                                                                                                        //a Rectangle surrounding the Arc, Start Angle and Sweep Angle
                                                                                                                                                                                                                                                                        graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);

                                                                                                                                                                                                                                                                        //Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
                                                                                                                                                                                                                                                                        graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));

                                                                                                                                                                                                                                                                        //Draw a Curve by specifying the Pen object having Green color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });

                                                                                                                                                                                                                                                                        //Draw an Ellipse using the Pen object and a surrounding Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));

                                                                                                                                                                                                                                                                        //Draw a Line 
                                                                                                                                                                                                                                                                        graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));

                                                                                                                                                                                                                                                                        //Draw a Pie segment
                                                                                                                                                                                                                                                                        graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);

                                                                                                                                                                                                                                                                        //Draw a Polygon by specifying the Pen object having Red color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });

                                                                                                                                                                                                                                                                        //Draw a Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));

                                                                                                                                                                                                                                                                        //Create a SolidBrush object and set its various properties
                                                                                                                                                                                                                                                                        Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
                                                                                                                                                                                                                                                                        brush.Color = Color.Purple;
                                                                                                                                                                                                                                                                        brush.Opacity = 100;

                                                                                                                                                                                                                                                                        //Draw a String using the SolidBrush object and Font, at specific Point
                                                                                                                                                                                                                                                                        graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));

                                                                                                                                                                                                                                                                        // save all changes.
                                                                                                                                                                                                                                                                        image.Save();
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                }

Exceptions

ArgumentNullException

pen’ is null.

DrawLine(ペン、ポイントF、ポイントF)

2つの Aspose.Imaging.PointF 構造を結びつけるラインを引き出します。

public void DrawLine(Pen pen, PointF point1, PointF point2)

Parameters

pen Pen

Aspose.Imaging.Pen は、ラインの色、幅、スタイルを決定します。

point1 PointF

Aspose.Imaging.PointF 構造は、最初に接続するポイントを表します。

point2 PointF

Aspose.Imaging.PointF 構造は、接続するための第 2 ポイントを表します。

Exceptions

ArgumentNullException

pen’ is null.

DrawLine(ペン、 int、 int、 int、 int)

コーディネートカップルによって指定された2つのポイントを結びつけるラインを引き出します。

public void DrawLine(Pen pen, int x1, int y1, int x2, int y2)

Parameters

pen Pen

Aspose.Imaging.Pen は、ラインの色、幅、スタイルを決定します。

x1 int

第一点のXコーディネートです。

y1 int

第一点のY・コーディネート。

x2 int

第2点のXコーディネートです。

y2 int

二番目の点のYコーディネート。

Exceptions

ArgumentNullException

pen’ is null.

DrawLine(フラット、フラット、フラット、フラット)

コーディネートカップルによって指定された2つのポイントを結びつけるラインを引き出します。

public void DrawLine(Pen pen, float x1, float y1, float x2, float y2)

Parameters

pen Pen

Aspose.Imaging.Pen は、ラインの色、幅、スタイルを決定します。

x1 float

第一点のXコーディネートです。

y1 float

第一点のY・コーディネート。

x2 float

第2点のXコーディネートです。

y2 float

二番目の点のYコーディネート。

Exceptions

ArgumentNullException

pen’ is null.

DrawLines(ペン、ポイント[])

Aspose.Imaging.Point の構造の範囲を結びつける一連のラインセグメントを引き出します。

public void DrawLines(Pen pen, Point[] points)

Parameters

pen Pen

Aspose.Imaging.Pen は、ラインセグメントの色、幅、スタイルを決定します。

points Point ( )

Aspose.Imaging.Point の構造は、接続するポイントを表しています。

Exceptions

ArgumentNullException

pen’ is null.-or-points’ is null.

ArgumentException

<コードクラス=“paramref”>ポイントの範囲は2点未満です。

DrawLines(ペン、ポイントF[])

Aspose.Imaging.PointF 構造の範囲を結びつける一連のラインセグメントを引き出します。

public void DrawLines(Pen pen, PointF[] points)

Parameters

pen Pen

Aspose.Imaging.Pen は、ラインセグメントの色、幅、スタイルを決定します。

points PointF ( )

Aspose.Imaging.PointF の構造は、接続するポイントを表しています。

Exceptions

ArgumentNullException

pen’ is null.-or-points’ is null.

ArgumentException

<コードクラス=“paramref”>ポイントの範囲は2点未満です。

DrawPath(ペン、グラフィックパス)

Aspose.Imaging.GraphicsPath を参照

public void DrawPath(Pen pen, GraphicsPath path)

Parameters

pen Pen

Aspose.Imaging.Pen は、道の色、幅、スタイルを決定します。

path GraphicsPath

Aspose.Imaging.Graphics 描く方法

Examples

これらの例は、グラフィックパスとグラフィッククラスを使用して画像表面上の数字を作成し、操作します。 例は、新しい画像(タイプのティフ)を作成し、表面をクリアし、グラフィックパスクラスの助けを借りてルートを引き出します。

//Create an instance of FileStream
                                                                                                                                                                                                                                                                                                                                             using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.tiff", System.IO.FileMode.Create))
                                                                                                                                                                                                                                                                                                                                             {
                                                                                                                                                                                                                                                                                                                                                 //Create an instance of TiffOptions and set its various properties
                                                                                                                                                                                                                                                                                                                                                 Aspose.Imaging.ImageOptions.TiffOptions tiffOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                                                                                                                                                                                                                                                                                 //Set the source for the instance of ImageOptions
                                                                                                                                                                                                                                                                                                                                                 tiffOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);

                                                                                                                                                                                                                                                                                                                                                 //Create an instance of Image 
                                                                                                                                                                                                                                                                                                                                                 using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(tiffOptions, 500, 500))
                                                                                                                                                                                                                                                                                                                                                 {
                                                                                                                                                                                                                                                                                                                                                     //Create and initialize an instance of Graphics class
                                                                                                                                                                                                                                                                                                                                                     Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                                                                                                                                                                                                                                                     //Clear Graphics surface
                                                                                                                                                                                                                                                                                                                                                     graphics.Clear(Color.Wheat);

                                                                                                                                                                                                                                                                                                                                                     //Create an instance of GraphicsPath class
                                                                                                                                                                                                                                                                                                                                                     Aspose.Imaging.GraphicsPath graphicspath = new Aspose.Imaging.GraphicsPath();

                                                                                                                                                                                                                                                                                                                                                     //Create an instance of Figure class
                                                                                                                                                                                                                                                                                                                                                     Aspose.Imaging.Figure figure = new Aspose.Imaging.Figure();

                                                                                                                                                                                                                                                                                                                                                     //Add Shapes to Figure object
                                                                                                                                                                                                                                                                                                                                                     figure.AddShape(new Aspose.Imaging.Shapes.RectangleShape(new Aspose.Imaging.RectangleF(10f, 10f, 300f, 300f)));
                                                                                                                                                                                                                                                                                                                                                     figure.AddShape(new Aspose.Imaging.Shapes.EllipseShape(new Aspose.Imaging.RectangleF(50f, 50f, 300f, 300f)));
                                                                                                                                                                                                                                                                                                                                                     figure.AddShape(new Aspose.Imaging.Shapes.PieShape(new Aspose.Imaging.RectangleF(new Aspose.Imaging.PointF(250f, 250f), new Aspose.Imaging.SizeF(200f, 200f)), 0f, 45f));

                                                                                                                                                                                                                                                                                                                                                     //Add Figure object to GraphicsPath
                                                                                                                                                                                                                                                                                                                                                     graphicspath.AddFigure(figure);

                                                                                                                                                                                                                                                                                                                                                     //Draw path with Pen object of color Black
                                                                                                                                                                                                                                                                                                                                                     graphics.DrawPath(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), graphicspath);

                                                                                                                                                                                                                                                                                                                                                     // save all changes.
                                                                                                                                                                                                                                                                                                                                                     image.Save();
                                                                                                                                                                                                                                                                                                                                                 }
                                                                                                                                                                                                                                                                                                                                             }

Exceptions

ArgumentNullException

pen’ is null.-or-path’ is null.

DrawPie(フラット、フラット、フラット、フラット)

Aspose.Imaging.RectangleFの構造と2つの放射線によって指定されたエリプスによって定義されたピアの形を描く。

public void DrawPie(Pen pen, RectangleF rect, float startAngle, float sweepAngle)

Parameters

pen Pen

Aspose.Imaging.Pen は、ピアの形状の色、幅、スタイルを決定します。

rect RectangleF

Aspose.Imaging.RectangleF 構造は、ピアの形が来るエリプスを定義する結合直角を表しています。

startAngle float

角度は、X軸からピア形の最初の側まで時計の程度で測定されます。

sweepAngle float

角度は startAngle’ パラメーターからピアの形状の反対側まで時刻形で測定されます。

Exceptions

ArgumentNullException

pen’ is null.

DrawPie(フラット、フラット、フラット、フラット、フラット、フラット)

コーディネートカップル、幅、高さ、および二つの放射線によって指定されたエリプスによって定義されたピアの形を描く。

public void DrawPie(Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle)

Parameters

pen Pen

Aspose.Imaging.Pen は、ピアの形状の色、幅、スタイルを決定します。

x float

結合直角の左上角のXコーディネートは、ピアの形が来るエリプスを定義します。

y float

結合直角の左上角のYコーディネートは、ピアの形が来るエリプスを定義する。

width float

横向きの直角の幅は、ピアの形が来るエリプスを定義します。

height float

線形の直角の高さは、ピアの形が来るエリプスを定義します。

startAngle float

角度は、X軸からピア形の最初の側まで時計の程度で測定されます。

sweepAngle float

角度は startAngle’ パラメーターからピアの形状の反対側まで時刻形で測定されます。

Exceptions

ArgumentNullException

pen’ is null.

DrawPie(ペン、直角、フラット、フラット)

Aspose.Imaging.Rectangle 構造と 2 つの放射線によって指定されたエリプスによって定義されたピアの形を描く。

public void DrawPie(Pen pen, Rectangle rect, float startAngle, float sweepAngle)

Parameters

pen Pen

Aspose.Imaging.Pen は、ピアの形状の色、幅、スタイルを決定します。

rect Rectangle

Aspose.Imaging.Rectangle 構造は、ピアの形が来るエリプスを定義する結合直角を表しています。

startAngle float

角度は、X軸からピア形の最初の側まで時計の程度で測定されます。

sweepAngle float

角度は startAngle’ パラメーターからピアの形状の反対側まで時刻形で測定されます。

Examples

この例では、画像表面に原始的な形状を作成するためにグラフィッククラスを使用します. 操作を示すために、例は PNG 形式の新しい画像を作成し、画像表面に原始的な形状を描き、グラフィッククラスが示すドラッグ方法を使用します。

//Creates an instance of FileStream
                                                                                                                                                                                                                                                                using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                    //Create an instance of PngOptions and set its various properties
                                                                                                                                                                                                                                                                    Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();

                                                                                                                                                                                                                                                                    //Set the Source for PngOptions
                                                                                                                                                                                                                                                                    pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);

                                                                                                                                                                                                                                                                    //Create an instance of Image 
                                                                                                                                                                                                                                                                    using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
                                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                                        //Create and initialize an instance of Graphics class
                                                                                                                                                                                                                                                                        Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                                                                                                                                                                        //Clear Graphics surface
                                                                                                                                                                                                                                                                        graphics.Clear(Aspose.Imaging.Color.Wheat);

                                                                                                                                                                                                                                                                        //Draw an Arc by specifying the Pen object having Black color, 
                                                                                                                                                                                                                                                                        //a Rectangle surrounding the Arc, Start Angle and Sweep Angle
                                                                                                                                                                                                                                                                        graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);

                                                                                                                                                                                                                                                                        //Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
                                                                                                                                                                                                                                                                        graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));

                                                                                                                                                                                                                                                                        //Draw a Curve by specifying the Pen object having Green color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });

                                                                                                                                                                                                                                                                        //Draw an Ellipse using the Pen object and a surrounding Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));

                                                                                                                                                                                                                                                                        //Draw a Line 
                                                                                                                                                                                                                                                                        graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));

                                                                                                                                                                                                                                                                        //Draw a Pie segment
                                                                                                                                                                                                                                                                        graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);

                                                                                                                                                                                                                                                                        //Draw a Polygon by specifying the Pen object having Red color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });

                                                                                                                                                                                                                                                                        //Draw a Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));

                                                                                                                                                                                                                                                                        //Create a SolidBrush object and set its various properties
                                                                                                                                                                                                                                                                        Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
                                                                                                                                                                                                                                                                        brush.Color = Color.Purple;
                                                                                                                                                                                                                                                                        brush.Opacity = 100;

                                                                                                                                                                                                                                                                        //Draw a String using the SolidBrush object and Font, at specific Point
                                                                                                                                                                                                                                                                        graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));

                                                                                                                                                                                                                                                                        // save all changes.
                                                                                                                                                                                                                                                                        image.Save();
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                }

Exceptions

ArgumentNullException

pen’ is null.

DrawPie(ペン、 int、 int、 int、 int、 int、 int)

コーディネートカップル、幅、高さ、および二つの放射線によって指定されたエリプスによって定義されたピアの形を描く。

public void DrawPie(Pen pen, int x, int y, int width, int height, int startAngle, int sweepAngle)

Parameters

pen Pen

Aspose.Imaging.Pen は、ピアの形状の色、幅、スタイルを決定します。

x int

結合直角の左上角のXコーディネートは、ピアの形が来るエリプスを定義します。

y int

結合直角の左上角のYコーディネートは、ピアの形が来るエリプスを定義する。

width int

横向きの直角の幅は、ピアの形が来るエリプスを定義します。

height int

線形の直角の高さは、ピアの形が来るエリプスを定義します。

startAngle int

角度は、X軸からピア形の最初の側まで時計の程度で測定されます。

sweepAngle int

角度は startAngle’ パラメーターからピアの形状の反対側まで時刻形で測定されます。

Exceptions

ArgumentNullException

pen’ is null.

DrawPolygon(ペン、ポイントF[])

Aspose.Imaging.PointF の構造の範囲によって定義されたポリゴンを引き出します。

public void DrawPolygon(Pen pen, PointF[] points)

Parameters

pen Pen

Aspose.Imaging.Pen は、ポリゴンの色、幅、スタイルを決定します。

points PointF ( )

Aspose.Imaging.PointF の構造は、ポリゴンの垂直を表しています。

Exceptions

ArgumentNullException

pen’ is null.-or-points’ is null.

DrawPolygon(ペン、ポイント[])

Aspose.Imaging.Point の構造の範囲によって定義されたポリゴンを引き出します。

public void DrawPolygon(Pen pen, Point[] points)

Parameters

pen Pen

Aspose.Imaging.Pen は、ポリゴンの色、幅、スタイルを決定します。

points Point ( )

Aspose.Imaging.Point の構造は、ポリゴンの垂直を表しています。

Examples

この例では、画像表面に原始的な形状を作成するためにグラフィッククラスを使用します. 操作を示すために、例は PNG 形式の新しい画像を作成し、画像表面に原始的な形状を描き、グラフィッククラスが示すドラッグ方法を使用します。

//Creates an instance of FileStream
                                                                                                                                                                                                                                                                using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                    //Create an instance of PngOptions and set its various properties
                                                                                                                                                                                                                                                                    Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();

                                                                                                                                                                                                                                                                    //Set the Source for PngOptions
                                                                                                                                                                                                                                                                    pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);

                                                                                                                                                                                                                                                                    //Create an instance of Image 
                                                                                                                                                                                                                                                                    using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
                                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                                        //Create and initialize an instance of Graphics class
                                                                                                                                                                                                                                                                        Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                                                                                                                                                                        //Clear Graphics surface
                                                                                                                                                                                                                                                                        graphics.Clear(Aspose.Imaging.Color.Wheat);

                                                                                                                                                                                                                                                                        //Draw an Arc by specifying the Pen object having Black color, 
                                                                                                                                                                                                                                                                        //a Rectangle surrounding the Arc, Start Angle and Sweep Angle
                                                                                                                                                                                                                                                                        graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);

                                                                                                                                                                                                                                                                        //Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
                                                                                                                                                                                                                                                                        graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));

                                                                                                                                                                                                                                                                        //Draw a Curve by specifying the Pen object having Green color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });

                                                                                                                                                                                                                                                                        //Draw an Ellipse using the Pen object and a surrounding Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));

                                                                                                                                                                                                                                                                        //Draw a Line 
                                                                                                                                                                                                                                                                        graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));

                                                                                                                                                                                                                                                                        //Draw a Pie segment
                                                                                                                                                                                                                                                                        graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);

                                                                                                                                                                                                                                                                        //Draw a Polygon by specifying the Pen object having Red color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });

                                                                                                                                                                                                                                                                        //Draw a Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));

                                                                                                                                                                                                                                                                        //Create a SolidBrush object and set its various properties
                                                                                                                                                                                                                                                                        Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
                                                                                                                                                                                                                                                                        brush.Color = Color.Purple;
                                                                                                                                                                                                                                                                        brush.Opacity = 100;

                                                                                                                                                                                                                                                                        //Draw a String using the SolidBrush object and Font, at specific Point
                                                                                                                                                                                                                                                                        graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));

                                                                                                                                                                                                                                                                        // save all changes.
                                                                                                                                                                                                                                                                        image.Save();
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                }

Exceptions

ArgumentNullException

pen’ is null.

DrawRectangle(ペン、レクトンゲルフ)

Aspose.Imaging.RectangleF の構造によって指定された直角を描く。

public void DrawRectangle(Pen pen, RectangleF rect)

Parameters

pen Pen

Aspose.Imaging.Pen は、直角の色、幅、スタイルを決定します。

rect RectangleF

Aspose.Imaging.RectangleFの構造は、描く直角を表しています。

Exceptions

ArgumentNullException

pen’ is null.

DrawRectangle(ペン、直角)

Aspose.Imaging.Rectangle の構造によって指定された直角を描く。

public void DrawRectangle(Pen pen, Rectangle rect)

Parameters

pen Pen

Aspose.Imaging.Pen は、直角の色、幅、スタイルを決定します。

rect Rectangle

Aspose.Imaging.Rectangle の構造は、描く直角を表しています。

Examples

この例では、画像表面に原始的な形状を作成するためにグラフィッククラスを使用します. 操作を示すために、例は PNG 形式の新しい画像を作成し、画像表面に原始的な形状を描き、グラフィッククラスが示すドラッグ方法を使用します。

//Creates an instance of FileStream
                                                                                                                                                                                                                                                                using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                    //Create an instance of PngOptions and set its various properties
                                                                                                                                                                                                                                                                    Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();

                                                                                                                                                                                                                                                                    //Set the Source for PngOptions
                                                                                                                                                                                                                                                                    pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);

                                                                                                                                                                                                                                                                    //Create an instance of Image 
                                                                                                                                                                                                                                                                    using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
                                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                                        //Create and initialize an instance of Graphics class
                                                                                                                                                                                                                                                                        Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                                                                                                                                                                        //Clear Graphics surface
                                                                                                                                                                                                                                                                        graphics.Clear(Aspose.Imaging.Color.Wheat);

                                                                                                                                                                                                                                                                        //Draw an Arc by specifying the Pen object having Black color, 
                                                                                                                                                                                                                                                                        //a Rectangle surrounding the Arc, Start Angle and Sweep Angle
                                                                                                                                                                                                                                                                        graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);

                                                                                                                                                                                                                                                                        //Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
                                                                                                                                                                                                                                                                        graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));

                                                                                                                                                                                                                                                                        //Draw a Curve by specifying the Pen object having Green color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });

                                                                                                                                                                                                                                                                        //Draw an Ellipse using the Pen object and a surrounding Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));

                                                                                                                                                                                                                                                                        //Draw a Line 
                                                                                                                                                                                                                                                                        graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));

                                                                                                                                                                                                                                                                        //Draw a Pie segment
                                                                                                                                                                                                                                                                        graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);

                                                                                                                                                                                                                                                                        //Draw a Polygon by specifying the Pen object having Red color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });

                                                                                                                                                                                                                                                                        //Draw a Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));

                                                                                                                                                                                                                                                                        //Create a SolidBrush object and set its various properties
                                                                                                                                                                                                                                                                        Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
                                                                                                                                                                                                                                                                        brush.Color = Color.Purple;
                                                                                                                                                                                                                                                                        brush.Opacity = 100;

                                                                                                                                                                                                                                                                        //Draw a String using the SolidBrush object and Font, at specific Point
                                                                                                                                                                                                                                                                        graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));

                                                                                                                                                                                                                                                                        // save all changes.
                                                                                                                                                                                                                                                                        image.Save();
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                }

Exceptions

ArgumentNullException

pen’ is null.

DrawRectangle(フラット、フラット、フラット、フラット)

コーディネートカップル、幅、高さによって指定された直角を引き出します。

public void DrawRectangle(Pen pen, float x, float y, float width, float height)

Parameters

pen Pen

Aspose.Imaging.Pen は、直角の色、幅、スタイルを決定します。

x float

直角の左上角のXコーディネートを描く。

y float

直角の右上角のYコーディネートを引き出す。

width float

直角の幅を描く。

height float

直角の高さを描く。

Exceptions

ArgumentNullException

pen’ is null.

DrawRectangle(ペン、 int、 int、 int、 int)

コーディネートカップル、幅、高さによって指定された直角を引き出します。

public void DrawRectangle(Pen pen, int x, int y, int width, int height)

Parameters

pen Pen

Aspose.Imaging.Pen は、直角の色、幅、スタイルを決定します。

x int

直角の左上角のXコーディネートを描く。

y int

直角の右上角のYコーディネートを引き出す。

width int

直角の幅を描く。

height int

直角の高さを描く。

Exceptions

ArgumentNullException

pen’ is null.

DrawRectangles(ペン、レクトンゲルフ[])

Aspose.Imaging.RectangleF構造によって指定された一連の直角を描く。

public void DrawRectangles(Pen pen, RectangleF[] rects)

Parameters

pen Pen

Aspose.Imaging.Pen は、直角の表面の色、幅、スタイルを決定します。

rects RectangleF ( )

Aspose.Imaging.RectangleFの構造は、描く直角を表しています。

Exceptions

ArgumentNullException

pen’ is null.-or-rects’ is null.

DrawRectangles(ペン、直角[])

Aspose.Imaging.Rectangle の構造によって指定された一連の直角を描く。

public void DrawRectangles(Pen pen, Rectangle[] rects)

Parameters

pen Pen

Aspose.Imaging.Pen は、直角の表面の色、幅、スタイルを決定します。

rects Rectangle ( )

Aspose.Imaging.Rectangle の構造は、描く直角を表しています。

Examples

この例では、ペンオブジェクトの作成と使用を示しています. この例では、新しい画像を作成し、画像の表面に直角を描きます。

//Create an instance of BmpOptions and set its various properties
                                                                                                                                       Aspose.Imaging.ImageOptions.BmpOptions bmpOptions = new Aspose.Imaging.ImageOptions.BmpOptions();
                                                                                                                                       bmpOptions.BitsPerPixel = 24;

                                                                                                                                       //Create an instance of FileCreateSource and assign it as Source for the instance of BmpOptions
                                                                                                                                       //Second Boolean parameter determines if the file to be created IsTemporal or not
                                                                                                                                       bmpOptions.Source = new Aspose.Imaging.Sources.FileCreateSource(@"C:\temp\sample.bmp", false);

                                                                                                                                       //Create an instance of Image at specified Path
                                                                                                                                       using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(bmpOptions, 500, 500))
                                                                                                                                       {
                                                                                                                                           //Create an instance of Graphics and initialize it with Image object
                                                                                                                                           Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                                           //Clear the Graphics sutface with White Color
                                                                                                                                           graphics.Clear(Aspose.Imaging.Color.White);

                                                                                                                                           //Create an instance of Pen with color Red and width 5
                                                                                                                                           Aspose.Imaging.Pen pen = new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 5f);

                                                                                                                                           //Create an instance of HatchBrush and set its properties
                                                                                                                                           Aspose.Imaging.Brushes.HatchBrush brush = new Aspose.Imaging.Brushes.HatchBrush();
                                                                                                                                           brush.BackgroundColor = Aspose.Imaging.Color.Wheat;
                                                                                                                                           brush.ForegroundColor = Aspose.Imaging.Color.Red;

                                                                                                                                           //Create an instance of Pen
                                                                                                                                           //initialize it with HatchBrush object and width
                                                                                                                                           Aspose.Imaging.Pen brusedpen = new Pen(brush, 5);

                                                                                                                                           //Draw Rectangles by specifying Pen object
                                                                                                                                           graphics.DrawRectangles(pen, new[]
                                                                                                                                           {
                                                                                                                                               new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(210, 210), new Aspose.Imaging.Size(100, 100)),
                                                                                                                                               new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(110, 110), new Aspose.Imaging.Size(100, 100)),
                                                                                                                                               new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(310, 310), new Aspose.Imaging.Size(100, 100))
                                                                                                                                           });

                                                                                                                                           //Draw Rectangles by specifying Pen object
                                                                                                                                           graphics.DrawRectangles(brusedpen, new[]
                                                                                                                                           {
                                                                                                                                               new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(310, 110), new Aspose.Imaging.Size(100, 100)),
                                                                                                                                               new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(110, 310), new Aspose.Imaging.Size(100, 100))
                                                                                                                                           });

                                                                                                                                           // save all changes.
                                                                                                                                           image.Save();
                                                                                                                                       }

Exceptions

ArgumentNullException

pen’ is null.-or-rects’ is null.

DrawString(フラット、フラット、フラット、フラット)

指定された位置に指定されたテキストラインを Aspose.Imaging.Brush と Aspose.Imaging.Font オブジェクトで引き出します。

public void DrawString(string s, Font font, Brush brush, float x, float y)

Parameters

s string

引っ張るためのストレッチ

font Font

Aspose.Imaging.Font は、文字のフォーマットを定義します。

brush Brush

Aspose.Imaging.Brush は、引き出されたテキストの色と構造を決定します。

x float

引き出されたテキストの左上角のXコーディネート。

y float

引き出されたテキストの上左角のYコーディネート。

Exceptions

ArgumentNullException

brush’ is null.-or-s’ is null.

DrawString(ストリップ、フォント、ブラッシュ、ポイントF)

指定された位置に指定されたテキストラインを Aspose.Imaging.Brush と Aspose.Imaging.Font オブジェクトで引き出します。

public void DrawString(string s, Font font, Brush brush, PointF point)

Parameters

s string

引っ張るためのストレッチ

font Font

Aspose.Imaging.Font は、文字のフォーマットを定義します。

brush Brush

Aspose.Imaging.Brush は、引き出されたテキストの色と構造を決定します。

point PointF

Aspose.Imaging.PointF 構造は、引き出されたテキストの左上角を指定します。

Examples

この例では、画像表面に原始的な形状を作成するためにグラフィッククラスを使用します. 操作を示すために、例は PNG 形式の新しい画像を作成し、画像表面に原始的な形状を描き、グラフィッククラスが示すドラッグ方法を使用します。

//Creates an instance of FileStream
                                                                                                                                                                                                                                                                using (System.IO.FileStream stream = new System.IO.FileStream(@"C:\temp\output.png", System.IO.FileMode.Create))
                                                                                                                                                                                                                                                                {
                                                                                                                                                                                                                                                                    //Create an instance of PngOptions and set its various properties
                                                                                                                                                                                                                                                                    Aspose.Imaging.ImageOptions.PngOptions pngOptions = new Aspose.Imaging.ImageOptions.PngOptions();

                                                                                                                                                                                                                                                                    //Set the Source for PngOptions
                                                                                                                                                                                                                                                                    pngOptions.Source = new Aspose.Imaging.Sources.StreamSource(stream);

                                                                                                                                                                                                                                                                    //Create an instance of Image 
                                                                                                                                                                                                                                                                    using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(pngOptions, 500, 500))
                                                                                                                                                                                                                                                                    {
                                                                                                                                                                                                                                                                        //Create and initialize an instance of Graphics class
                                                                                                                                                                                                                                                                        Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);

                                                                                                                                                                                                                                                                        //Clear Graphics surface
                                                                                                                                                                                                                                                                        graphics.Clear(Aspose.Imaging.Color.Wheat);

                                                                                                                                                                                                                                                                        //Draw an Arc by specifying the Pen object having Black color, 
                                                                                                                                                                                                                                                                        //a Rectangle surrounding the Arc, Start Angle and Sweep Angle
                                                                                                                                                                                                                                                                        graphics.DrawArc(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Black, 2), new Aspose.Imaging.Rectangle(200, 200, 100, 200), 0, 300);

                                                                                                                                                                                                                                                                        //Draw a Bezier by specifying the Pen object having Blue color and co-ordinate Points.
                                                                                                                                                                                                                                                                        graphics.DrawBezier(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Blue, 2), new Aspose.Imaging.Point(250, 100), new Aspose.Imaging.Point(300, 30), new Aspose.Imaging.Point(450, 100), new Aspose.Imaging.Point(235, 25));

                                                                                                                                                                                                                                                                        //Draw a Curve by specifying the Pen object having Green color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawCurve(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Green, 2), new[] { new Aspose.Imaging.Point(100, 200), new Aspose.Imaging.Point(100, 350), new Aspose.Imaging.Point(200, 450) });

                                                                                                                                                                                                                                                                        //Draw an Ellipse using the Pen object and a surrounding Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawEllipse(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Yellow, 2), new Aspose.Imaging.Rectangle(300, 300, 100, 100));

                                                                                                                                                                                                                                                                        //Draw a Line 
                                                                                                                                                                                                                                                                        graphics.DrawLine(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Violet, 2), new Aspose.Imaging.Point(100, 100), new Aspose.Imaging.Point(200, 200));

                                                                                                                                                                                                                                                                        //Draw a Pie segment
                                                                                                                                                                                                                                                                        graphics.DrawPie(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Silver, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(200, 20), new Aspose.Imaging.Size(200, 200)), 0, 45);

                                                                                                                                                                                                                                                                        //Draw a Polygon by specifying the Pen object having Red color and an array of Points
                                                                                                                                                                                                                                                                        graphics.DrawPolygon(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Red, 2), new[] { new Aspose.Imaging.Point(20, 100), new Aspose.Imaging.Point(20, 200), new Aspose.Imaging.Point(220, 20) });

                                                                                                                                                                                                                                                                        //Draw a Rectangle
                                                                                                                                                                                                                                                                        graphics.DrawRectangle(new Aspose.Imaging.Pen(Aspose.Imaging.Color.Orange, 2), new Aspose.Imaging.Rectangle(new Aspose.Imaging.Point(250, 250), new Aspose.Imaging.Size(100, 100)));

                                                                                                                                                                                                                                                                        //Create a SolidBrush object and set its various properties
                                                                                                                                                                                                                                                                        Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush();
                                                                                                                                                                                                                                                                        brush.Color = Color.Purple;
                                                                                                                                                                                                                                                                        brush.Opacity = 100;

                                                                                                                                                                                                                                                                        //Draw a String using the SolidBrush object and Font, at specific Point
                                                                                                                                                                                                                                                                        graphics.DrawString("This image is created by Aspose.Imaging API", new Aspose.Imaging.Font("Times New Roman", 16), brush, new Aspose.Imaging.PointF(50, 400));

                                                                                                                                                                                                                                                                        // save all changes.
                                                                                                                                                                                                                                                                        image.Save();
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                }

Exceptions

ArgumentNullException

brush’ is null.-or-s’ is null.

DrawString(フラット、フラット、フラット、フラット、フラット、フラット)

指定された位置に指定されたテキストラインを指定された Aspose.Imaging.Brush と Aspose.Imaging.Font オブジェクトを使用して指定された Aspose.Imaging.StringFormat のフォーマット 属性を使用します。

public void DrawString(string s, Font font, Brush brush, float x, float y, StringFormat format)

Parameters

s string

引っ張るためのストレッチ

font Font

Aspose.Imaging.Font は、文字のフォーマットを定義します。

brush Brush

Aspose.Imaging.Brush は、引き出されたテキストの色と構造を決定します。

x float

引き出されたテキストの左上角のXコーディネート。

y float

引き出されたテキストの上左角のYコーディネート。

format StringFormat

Aspose.Imaging.StringFormatは、ラインスペースと調和などのフォーマット特性を指定し、引き出されたテキストに適用されます。

Exceptions

ArgumentNullException

brush’ is null.-or-s’ is null.

DrawString(ストリック、フォント、ブラッシュ、ポイントF、ストリングフォーマット)

指定された位置に指定されたテキストラインを指定された Aspose.Imaging.Brush と Aspose.Imaging.Font オブジェクトを使用して指定された Aspose.Imaging.StringFormat のフォーマット 属性を使用します。

public void DrawString(string s, Font font, Brush brush, PointF point, StringFormat format)

Parameters

s string

引っ張るためのストレッチ

font Font

Aspose.Imaging.Font は、文字のフォーマットを定義します。

brush Brush

Aspose.Imaging.Brush は、引き出されたテキストの色と構造を決定します。

point PointF

Aspose.Imaging.PointF 構造は、引き出されたテキストの左上角を指定します。

format StringFormat

Aspose.Imaging.StringFormatは、ラインスペースと調和などのフォーマット特性を指定し、引き出されたテキストに適用されます。

Exceptions

ArgumentNullException

brush’ is null.-or-s’ is null.

DrawString(ストリップ、フォント、ブラッシュ、RectangleF)

指定された文字列を指定された直角に、指定された Aspose.Imaging.Brush と Aspose.Imaging.Font オブジェクトで引き出します。

public void DrawString(string s, Font font, Brush brush, RectangleF layoutRectangle)

Parameters

s string

引っ張るためのストレッチ

font Font

Aspose.Imaging.Font は、文字のフォーマットを定義します。

brush Brush

Aspose.Imaging.Brush は、引き出されたテキストの色と構造を決定します。

layoutRectangle RectangleF

Aspose.Imaging.RectangleF 構造は、引き出されたテキストの位置を指定します。

Exceptions

ArgumentNullException

brush’ is null.-or-s’ is null.

DrawString(ストリック、フォント、ブラッシュ、RectangleF、StringFormat)

指定された文字列を指定された直角で指定された Aspose.Imaging.Brush と Aspose.Imaging.Font オブジェクトを使用して指定された Aspose.Imaging.StringFormat のフォーマット 属性を使用します。

public void DrawString(string s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format)

Parameters

s string

引っ張るためのストレッチ

font Font

Aspose.Imaging.Font は、文字のフォーマットを定義します。

brush Brush

Aspose.Imaging.Brush は、引き出されたテキストの色と構造を決定します。

layoutRectangle RectangleF

Aspose.Imaging.RectangleF 構造は、引き出されたテキストの位置を指定します。

format StringFormat

Aspose.Imaging.StringFormatは、ラインスペースと調和などのフォーマット特性を指定し、引き出されたテキストに適用されます。

Exceptions

ArgumentNullException

brush’ is null.-or-s’ is null.-or-brush’ is null.

EndUpdate()

BeginUpdate が呼ばれた後に始まったグラフィック作業のキャッシュが終了します 以前のグラフィック作業は、この方法を呼び出すときにすぐに適用されます。

public void EndUpdate()

FillClosedCurve(ブリュッシュ、ポイントF[])

Aspose.Imaging.PointF 構造の順序によって定義された閉鎖されたカーディナルスプリング曲線の内部を満たすこの方法は、0.5 と Aspose.Imaging.FillMode.Alternate の既定の圧力を使用します。

public void FillClosedCurve(Brush brush, PointF[] points)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

points PointF ( )

Aspose.Imaging.PointF の構造が spline を定義します。

Exceptions

ArgumentNullException

brush’ is null.-or-points’ is null.

FillClosedCurve(ブリュッシュ、ポイントF( ), フィルムモード)

Aspose.Imaging.PointF 構造の順序によって定義された閉鎖されたカーディナルスプリング曲線の内部を満たし、指定された満たしモードを使用します。

public void FillClosedCurve(Brush brush, PointF[] points, FillMode fillMode)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

points PointF ( )

Aspose.Imaging.PointF の構造が spline を定義します。

fillMode FillMode

Aspose.Imaging.FillMode リストのメンバーで、曲線がどのように満たされているかを決定します。

Exceptions

ArgumentNullException

brush’ is null.-or-points’ is null.

FillClosedCurve(ブリュッシュ、ポイントF( ), フロア、フロア)

Aspose.Imaging.PointF 構造の順序によって定義された閉鎖されたカーディナルスプリング曲線の内部を満たし、指定された満たしモードと電圧を使用します。

public void FillClosedCurve(Brush brush, PointF[] points, FillMode fillmode, float tension)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

points PointF ( )

Aspose.Imaging.PointF の構造が spline を定義します。

fillmode FillMode

Aspose.Imaging.FillMode リストのメンバーで、曲線がどのように満たされているかを決定します。

tension float

値は 0.0F 以上または同等で、曲線の電圧を指定します。

Exceptions

ArgumentNullException

brush’ is null.-or-points’ is null.

FillClosedCurve(ブリュッシュ、ポイント[])

Aspose.Imaging.Point の構造の順序によって定義された閉鎖されたカーディナル スプリング 曲線の内部を満たします この方法は、0.5 のデフォルト ストレッチと Aspose.Imaging.FillMode.Alternate フルモードを使用します。

public void FillClosedCurve(Brush brush, Point[] points)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

points Point ( )

Aspose.Imaging.Point の構造が spline を定義します。

Exceptions

ArgumentNullException

brush’ is null.-or-points’ is null.

FillClosedCurve(ブリュッシュ、ポイント( ), フィルムモード)

Aspose.Imaging.Point の構造の順序によって定義された閉鎖されたカーディナルスプリング曲線の内部を満たし、指定された満たしモードを使用します。

public void FillClosedCurve(Brush brush, Point[] points, FillMode fillmode)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

points Point ( )

Aspose.Imaging.Point の構造が spline を定義します。

fillmode FillMode

Aspose.Imaging.FillMode リストのメンバーで、曲線がどのように満たされているかを決定します。

Exceptions

ArgumentNullException

brush’ is null.-or-points’ is null.

FillClosedCurve(ブリュッシュ、ポイント( ), フロア、フロア)

Aspose.Imaging.Point の構造の範囲によって定義された閉鎖されたカーディナルスプリング曲線の内部を満たし、指定された満たしモードと電圧を使用します。

public void FillClosedCurve(Brush brush, Point[] points, FillMode fillmode, float tension)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

points Point ( )

Aspose.Imaging.Point の構造が spline を定義します。

fillmode FillMode

Aspose.Imaging.FillMode リストのメンバーで、曲線がどのように満たされているかを決定します。

tension float

値は 0.0F 以上または同等で、曲線の電圧を指定します。

Exceptions

ArgumentNullException

brush’ is null.-or-points’ is null.

FillEllipse(ブリュッシュ、RectangleF)

Aspose.Imaging.RectangleF構造によって指定された結合直角によって定義されたエリプスの内部を満たす。

public void FillEllipse(Brush brush, RectangleF rect)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

rect RectangleF

Aspose.Imaging.RectangleF 構造は、エリプスを定義する結合直角を表しています。

Exceptions

ArgumentNullException

brush’ is null.

FillEllipse(フラット、フラット、フラット、フラット)

エリプスの内部を満たし、一連のコード、幅、高さによって指定された結合直角によって定義されます。

public void FillEllipse(Brush brush, float x, float y, float width, float height)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

x float

エリプスを定義する結合直角の上左角のXコーディネート。

y float

エリプスを定義する結合直角の上左角のYコーディネート。

width float

エリプスを定義する結合直角の幅。

height float

エリプスを定義する結合直角の高さ。

Exceptions

ArgumentNullException

brush’ is null.

FillEllipse(ブリュッシュ、レクトアンゲル)

Aspose.Imaging.Rectangle 構造によって指定された結合直角によって定義されたエリプスの内部を満たす。

public void FillEllipse(Brush brush, Rectangle rect)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

rect Rectangle

Aspose.Imaging.Rectangle 構造は、エリプスを定義する結合直角を表しています。

Exceptions

ArgumentNullException

brush’ is null.

FillEllipse(ブリュッシュ、 int、 int、 int、 int)

エリプスの内部を満たし、一連のコード、幅、高さによって指定された結合直角によって定義されます。

public void FillEllipse(Brush brush, int x, int y, int width, int height)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

x int

エリプスを定義する結合直角の上左角のXコーディネート。

y int

エリプスを定義する結合直角の上左角のYコーディネート。

width int

エリプスを定義する結合直角の幅。

height int

エリプスを定義する結合直角の高さ。

Exceptions

ArgumentNullException

brush’ is null.

FillPath(ブラッシュ、グラフィックパス)

Aspose.Imaging.GraphicsPathの内部を満たす。

public void FillPath(Brush brush, GraphicsPath path)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

path GraphicsPath

Aspose.Imaging.GraphicsPathは、満たすための道を表しています。

Exceptions

ArgumentNullException

brush’ is null.-or-path’ is null.

FillPie(フラット、フラット、フラット、フラット)

Aspose.Imaging.RectangleF構造と2つの放射線によって指定されたエリプスによって定義されたピアセクションの内部を満たす。

public void FillPie(Brush brush, Rectangle rect, float startAngle, float sweepAngle)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

rect Rectangle

Aspose.Imaging.Rectangle 構造は、ピースセクションが来るエリプスを定義する結合直角を表しています。

startAngle float

グレードの角度は、X軸からピアセクションの最初の側まで時計的に測定されます。

sweepAngle float

<コードクラス=“パラムレフ”>スタートAngleのパラメーターからピアセクションの2番目の側に測定されたグレードの角度。

Examples

下記の例では、個々のGIFブロックからアニメ化されたGIF画像を構成する方法を示しています。

string dir = "c:\\temp\\";

                                                                                                       // Create a GIF image 100 x 100 px.
                                                                                                       // The first block is fully black by default.
                                                                                                       using (Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock firstBlock = new Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock(100, 100))
                                                                                                       using (Aspose.Imaging.FileFormats.Gif.GifImage gifImage = new Aspose.Imaging.FileFormats.Gif.GifImage(firstBlock))
                                                                                                       {
                                                                                                           // The first circle is red
                                                                                                           Aspose.Imaging.Brushes.SolidBrush brush1 = new Aspose.Imaging.Brushes.SolidBrush(Aspose.Imaging.Color.Red);

                                                                                                           // The second circle is black
                                                                                                           Aspose.Imaging.Brushes.SolidBrush brush2 = new Aspose.Imaging.Brushes.SolidBrush(Aspose.Imaging.Color.Black);

                                                                                                           // Gradually inscrease the angle of the red arc shape.
                                                                                                           for (int angle = 10; angle &lt;= 360; angle += 10)
                                                                                                           {
                                                                                                               Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock block = new Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock(100, 100);

                                                                                                               Aspose.Imaging.Graphics gr = new Aspose.Imaging.Graphics(block);
                                                                                                               gr.FillPie(brush1, block.Bounds, 0, angle);

                                                                                                               gifImage.AddBlock(block);
                                                                                                           }

                                                                                                           // Gradually inscrease the angle of the black arc and wipe out the red arc.
                                                                                                           for (int angle = 10; angle &lt;= 360; angle += 10)
                                                                                                           {
                                                                                                               Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock block = new Aspose.Imaging.FileFormats.Gif.Blocks.GifFrameBlock(100, 100);

                                                                                                               Aspose.Imaging.Graphics gr = new Aspose.Imaging.Graphics(block);
                                                                                                               gr.FillPie(brush2, block.Bounds, 0, angle);
                                                                                                               gr.FillPie(brush1, block.Bounds, angle, 360 - angle);

                                                                                                               gifImage.AddBlock(block);
                                                                                                           }

                                                                                                           gifImage.Save(dir + "animated_radar.gif");
                                                                                                       }

Exceptions

ArgumentNullException

brush’ is null.

FillPie(ブリュッシュ、RectangleF、フラット、フラット)

Aspose.Imaging.RectangleF構造と2つの放射線によって指定されたエリプスによって定義されたピアセクションの内部を満たす。

public void FillPie(Brush brush, RectangleF rect, float startAngle, float sweepAngle)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

rect RectangleF

Aspose.Imaging.RectangleF 構造は、ピースセクションが来るエリプスを定義する結合直角を表しています。

startAngle float

グレードの角度は、X軸からピアセクションの最初の側まで時計的に測定されます。

sweepAngle float

<コードクラス=“パラムレフ”>スタートAngleのパラメーターからピアセクションの2番目の側に測定されたグレードの角度。

Exceptions

ArgumentNullException

brush’ is null.

FillPie(フラット、フラット、フラット、フラット、フラット、フラット)

ピアセクションの内部を満たし、一連のコルダート、幅、高さ、および二つの放射線によって指定されたエリプスによって定義されます。

public void FillPie(Brush brush, float x, float y, float width, float height, float startAngle, float sweepAngle)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

x float

結合直角の左上角のXコーディネートは、ピースセクションが来るエリプスを定義します。

y float

横向き直角の左上角のYコーディネートは、ピースセクションが来るエリプスを定義します。

width float

横向きの直角の幅は、ピースセクションが来るエリプスを定義します。

height float

曲線直角の高さは、ピースセクションが来るエリプスを定義します。

startAngle float

グレードの角度は、X軸からピアセクションの最初の側まで時計的に測定されます。

sweepAngle float

<コードクラス=“パラムレフ”>スタートAngleのパラメーターからピアセクションの2番目の側に測定されたグレードの角度。

Exceptions

ArgumentNullException

brush’ is null.

FillPie(ブリュッシュ、 int、 int、 int、 int、 int、 int)

ピアセクションの内部を満たし、一連のコルダート、幅、高さ、および二つの放射線によって指定されたエリプスによって定義されます。

public void FillPie(Brush brush, int x, int y, int width, int height, int startAngle, int sweepAngle)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

x int

結合直角の左上角のXコーディネートは、ピースセクションが来るエリプスを定義します。

y int

横向き直角の左上角のYコーディネートは、ピースセクションが来るエリプスを定義します。

width int

横向きの直角の幅は、ピースセクションが来るエリプスを定義します。

height int

曲線直角の高さは、ピースセクションが来るエリプスを定義します。

startAngle int

グレードの角度は、X軸からピアセクションの最初の側まで時計的に測定されます。

sweepAngle int

<コードクラス=“パラムレフ”>スタートAngleのパラメーターからピアセクションの2番目の側に測定されたグレードの角度。

Exceptions

ArgumentNullException

brush’ is null.

FillPolygon(ブリュッシュ、ポイントF[])

Aspose.Imaging.PointF 構造と Aspose.Imaging.FillMode.Alternate によって定義されたポリゴンの内部を満たす。

public void FillPolygon(Brush brush, PointF[] points)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

points PointF ( )

Aspose.Imaging.PointF の構造は、ポリゴンの垂直を表しています。

Exceptions

ArgumentNullException

brush’ is null.-or-points’ is null.

FillPolygon(ブリュッシュ、ポイントF( ), フィルムモード)

Aspose.Imaging.PointF 構造によって指定された点数によって定義されたポリゴンの内部を満たす。

public void FillPolygon(Brush brush, PointF[] points, FillMode fillMode)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

points PointF ( )

Aspose.Imaging.PointF の構造は、ポリゴンの垂直を表しています。

fillMode FillMode

Aspose.Imaging.FillMode リストのメンバーで、フィールドのスタイルを決定します。

Exceptions

ArgumentNullException

brush’ is null.-or-points’ is null.

FillPolygon(ブリュッシュ、ポイント[])

Aspose.Imaging.Point の構造と Aspose.Imaging.FillMode.Alternate によって定義されたポリゴンの内部を満たす。

public void FillPolygon(Brush brush, Point[] points)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

points Point ( )

Aspose.Imaging.Point の構造は、ポリゴンの垂直を表しています。

Exceptions

ArgumentNullException

brush’ is null.-or-points’ is null.

FillPolygon(ブリュッシュ、ポイント( ), フィルムモード)

Aspose.Imaging.Point によって指定された点の範囲によって定義されたポリゴンの内部を満たす。

public void FillPolygon(Brush brush, Point[] points, FillMode fillMode)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

points Point ( )

Aspose.Imaging.Point の構造は、ポリゴンの垂直を表しています。

fillMode FillMode

Aspose.Imaging.FillMode リストのメンバーで、フィールドのスタイルを決定します。

Exceptions

ArgumentNullException

brush’ is null.-or-points’ is null.

FillRectangle(ブリュッシュ、レクトアンゲル)

Aspose.Imaging.Rectangle の構造によって指定された直角の内部を満たす。

public void FillRectangle(Brush brush, Rectangle rect)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

rect Rectangle

Aspose.Imaging.Rectangle構造は、満たす直角を表しています。

Exceptions

ArgumentNullException

brush’ is null.

FillRectangle(ブリュッシュ、RectangleF)

Aspose.Imaging.RectangleF構造によって指定された直角の内部を満たす。

public void FillRectangle(Brush brush, RectangleF rect)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

rect RectangleF

Aspose.Imaging.RectangleF構造は、満たす直角を表しています。

Exceptions

ArgumentNullException

brush’ is null.

FillRectangle(フラット、フラット、フラット、フラット)

直角の内部を満たし、一組の座標、幅、高さによって指定されます。

public void FillRectangle(Brush brush, float x, float y, float width, float height)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

x float

正角の左上角のXコーディネートを満たす。

y float

直角の左上角のYコーディネートを満たす。

width float

直角の幅を満たす。

height float

直角の高さが満たされる。

Exceptions

ArgumentNullException

brush’ is null.

FillRectangle(ブリュッシュ、 int、 int、 int、 int)

直角の内部を満たし、一組の座標、幅、高さによって指定されます。

public void FillRectangle(Brush brush, int x, int y, int width, int height)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

x int

正角の左上角のXコーディネートを満たす。

y int

直角の左上角のYコーディネートを満たす。

width int

直角の幅を満たす。

height int

直角の高さが満たされる。

Exceptions

ArgumentNullException

brush’ is null.

FillRectangles(ブリュッシュ、レクトアンゲル[])

Aspose.Imaging.Rectangle によって指定された一連の直角の内部を満たす。

public void FillRectangles(Brush brush, Rectangle[] rects)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

rects Rectangle ( )

Aspose.Imaging.Rectangle の構造は、満たす直角を表しています。

Exceptions

ArgumentNullException

brush’ is null or rects’ is null.

FillRectangles(ブリュッシュ、RectangleF[])

Aspose.Imaging.RectangleF構造によって指定された一連の直角の内部を満たす。

public void FillRectangles(Brush brush, RectangleF[] rects)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

rects RectangleF ( )

Aspose.Imaging.Rectangle の構造は、満たす直角を表しています。

Exceptions

ArgumentNullException

brush’ is null or rects’ is null.

FillRegion(ブリュッシュ, 地域)

Aspose.Imaging.Regionの内部を満たす。

public void FillRegion(Brush brush, Region region)

Parameters

brush Brush

Aspose.Imaging.Brush は、フィールドの特徴を決定します。

region Region

Aspose.Imaging.Region を表す領域。

Exceptions

ArgumentNullException

brush’ is null.-or-region’ is null.

~Graphics()

protected ~Graphics()

MeasureString(ストリック、フォント、SizeF、StringFormat)

指定されたパラメーターで指定されたテキストラインを測定する

public SizeF MeasureString(string text, Font font, SizeF layoutArea, StringFormat stringFormat)

Parameters

text string

測定するためのテキスト

font Font

文字を測る。

layoutArea SizeF

レイアウトエリア

stringFormat StringFormat

ストレッチフォーマット

Returns

SizeF

測定テキストラインのピクセルサイズ

MultiplyTransform(Matrix)

Aspose.Imaging.Matrix は、この Aspose.Imaging.Graphics の地理的変換を指定した Aspose.Imaging.Matrix によって表す Aspose.Imaging.Matrix を複数化し、指定した Aspose.Imaging.Matrix を表します。

public void MultiplyTransform(Matrix matrix)

Parameters

matrix Matrix

Aspose.Imaging.Matrix は、地質変換を倍増するためのマトリックスです。

MultiplyTransform(マトリックス、マトリックスオーダー)

Aspose.Imaging.Matrix を複数化し、この Aspose.Imaging.Graphics の地理的変換を指定した順序で Aspose.Imaging.Matrix によって表します。

public void MultiplyTransform(Matrix matrix, MatrixOrder order)

Parameters

matrix Matrix

Aspose.Imaging.Matrix は、地質変換を倍増するためのマトリックスです。

order MatrixOrder

Aspose.Imaging.MatrixOrder は、どの目的で2つのマトリックスを倍増するかを指定します。

ResetTransform()

Aspose.Imaging.Graphics.財産をアイデンティティに変換する。

public void ResetTransform()

RotateTransform(フラット)

地元の地質変換を指定された量によって回転します この方法は変換に回転を前提とします。

public void RotateTransform(float angle)

Parameters

angle float

回転の角度。

RotateTransform(フロア、マトリックスオーダー)

地元の地質変換を指定された順序で指定された量によって回転します。

public void RotateTransform(float angle, MatrixOrder order)

Parameters

angle float

回転の角度。

order MatrixOrder

Aspose.Imaging.MatrixOrder は、回転マトリックスを追加するかプレビングするかどうかを指定します。

ScaleTransform(フロア、フロア)

地元の地質学的変換を指定された量によってスケールします この方法は、スケールマトリックスを変換に接続します。

public void ScaleTransform(float sx, float sy)

Parameters

sx float

変換をX軸の方向にスケールする量。

sy float

Y軸の方向に変換をスケールする量。

ScaleTransform(フラット、フラット、マトリックスオーダー)

地元の地質変換を指定された順序で指定された量によってスケールします。

public void ScaleTransform(float sx, float sy, MatrixOrder order)

Parameters

sx float

変換をX軸の方向にスケールする量。

sy float

Y軸の方向に変換をスケールする量。

order MatrixOrder

Aspose.Imaging.MatrixOrder は、スケールマトリックスを拡張するか拡張するかを指定します。

TranslateTransform(フロア、フロア)

地元の地質学的変換を指定された次元によって翻訳するこの方法は、変換に翻訳を前提とする。

public void TranslateTransform(float dx, float dy)

Parameters

dx float

x の翻訳の価値

dy float

翻訳の価値はY。

TranslateTransform(フラット、フラット、マトリックスオーダー)

地元の地理的変換を指定された順序で指定された次元によって翻訳します。

public void TranslateTransform(float dx, float dy, MatrixOrder order)

Parameters

dx float

x の翻訳の価値

dy float

翻訳の価値はY。

order MatrixOrder

翻訳を適用するオーダー(プレペンドまたはアペンド)

 日本語