GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / DrawEllipse Method / DrawEllipse(Int32,Single,Single,Single,Single,GdPictureColor,Single,Boolean) Method
GdPicture image identifier.
Specifies the x-coordinate of the upper-left corner of the rectangle that bounds the ellipse.
Specifies the y-coordinate of the upper-left corner of the rectangle that bounds the ellipse.
Specifies the width of the rectangle that bounds the ellipse.
Specifies the height of the rectangle that bounds the ellipse.
Color of the ellipse. A suitable color value can be obtained by using the ARGB() method.
The width, in pixel, of the pen used to draw the ellipse.
Set to True to apply the Antialiasing algorithm else False.
Example





In This Topic
DrawEllipse(Int32,Single,Single,Single,Single,GdPictureColor,Single,Boolean) Method
In This Topic
Draws an ellipse on a GdPicture image.
Syntax
'Declaration
 
Public Overloads Function DrawEllipse( _
   ByVal ImageID As Integer, _
   ByVal DstLeft As Single, _
   ByVal DstTop As Single, _
   ByVal Width As Single, _
   ByVal Height As Single, _
   ByVal PenColor As GdPictureColor, _
   ByVal PenWidth As Single, _
   ByVal AntiAlias As Boolean _
) As GdPictureStatus
public GdPictureStatus DrawEllipse( 
   int ImageID,
   float DstLeft,
   float DstTop,
   float Width,
   float Height,
   GdPictureColor PenColor,
   float PenWidth,
   bool AntiAlias
)
public function DrawEllipse( 
    ImageID: Integer;
    DstLeft: Single;
    DstTop: Single;
    Width: Single;
    Height: Single;
    PenColor: GdPictureColor;
    PenWidth: Single;
    AntiAlias: Boolean
): GdPictureStatus; 
public function DrawEllipse( 
   ImageID : int,
   DstLeft : float,
   DstTop : float,
   Width : float,
   Height : float,
   PenColor : GdPictureColor,
   PenWidth : float,
   AntiAlias : boolean
) : GdPictureStatus;
public: GdPictureStatus DrawEllipse( 
   int ImageID,
   float DstLeft,
   float DstTop,
   float Width,
   float Height,
   GdPictureColor PenColor,
   float PenWidth,
   bool AntiAlias
) 
public:
GdPictureStatus DrawEllipse( 
   int ImageID,
   float DstLeft,
   float DstTop,
   float Width,
   float Height,
   GdPictureColor PenColor,
   float PenWidth,
   bool AntiAlias
) 

Parameters

ImageID
GdPicture image identifier.
DstLeft
Specifies the x-coordinate of the upper-left corner of the rectangle that bounds the ellipse.
DstTop
Specifies the y-coordinate of the upper-left corner of the rectangle that bounds the ellipse.
Width
Specifies the width of the rectangle that bounds the ellipse.
Height
Specifies the height of the rectangle that bounds the ellipse.
PenColor
Color of the ellipse. A suitable color value can be obtained by using the ARGB() method.
PenWidth
The width, in pixel, of the pen used to draw the ellipse.
AntiAlias
Set to True to apply the Antialiasing algorithm else False.

Return Value

A member of the GdPictureStatus enumeration.
Example
Drawing a red arc on top of a black ellipse on a pgn image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("input.png");
 
    // Draw the black elipse.
    gdpictureImaging.DrawEllipse(imageID, 50, 50, 100, 50, gdpictureImaging.ARGB(255, 0, 0, 0), 1, true);
 
    // Draw the red arc using the same ellipse parameters and chosen angles.
    gdpictureImaging.DrawArc(imageID, 50, 50, 100, 50, 200, 160, 2, gdpictureImaging.ARGB(255, 255, 0, 0), true);
 
    gdpictureImaging.SaveAsPNG(imageID, "output.png");
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also