GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / DrawCircle Method / DrawCircle(Int32,Single,Single,Single,Int32,Single,Boolean) Method
GdPicture image identifier.
Specifies the x-coordinate of the center of the circle.
Specifies the y-coordinate of the center of the circle.
Diameter of the circle in pixel.
The circle color. A suitable color value can be obtained by using the ARGBI() method.
The width, in pixel, of the pen used to draw the circle.
Set to True to apply the Antialiasing algorithm else False.
Example





In This Topic
DrawCircle(Int32,Single,Single,Single,Int32,Single,Boolean) Method
In This Topic
Draws a circle on a GdPicture image. The drawing color is specified with an integer value.
Syntax
'Declaration
 
Public Overloads Function DrawCircle( _
   ByVal ImageID As Integer, _
   ByVal DstLeft As Single, _
   ByVal DstTop As Single, _
   ByVal Diameter As Single, _
   ByVal PenColor As Integer, _
   ByVal PenWidth As Single, _
   ByVal AntiAlias As Boolean _
) As GdPictureStatus
public GdPictureStatus DrawCircle( 
   int ImageID,
   float DstLeft,
   float DstTop,
   float Diameter,
   int PenColor,
   float PenWidth,
   bool AntiAlias
)
public function DrawCircle( 
    ImageID: Integer;
    DstLeft: Single;
    DstTop: Single;
    Diameter: Single;
    PenColor: Integer;
    PenWidth: Single;
    AntiAlias: Boolean
): GdPictureStatus; 
public function DrawCircle( 
   ImageID : int,
   DstLeft : float,
   DstTop : float,
   Diameter : float,
   PenColor : int,
   PenWidth : float,
   AntiAlias : boolean
) : GdPictureStatus;
public: GdPictureStatus DrawCircle( 
   int ImageID,
   float DstLeft,
   float DstTop,
   float Diameter,
   int PenColor,
   float PenWidth,
   bool AntiAlias
) 
public:
GdPictureStatus DrawCircle( 
   int ImageID,
   float DstLeft,
   float DstTop,
   float Diameter,
   int PenColor,
   float PenWidth,
   bool AntiAlias
) 

Parameters

ImageID
GdPicture image identifier.
DstLeft
Specifies the x-coordinate of the center of the circle.
DstTop
Specifies the y-coordinate of the center of the circle.
Diameter
Diameter of the circle in pixel.
PenColor
The circle color. A suitable color value can be obtained by using the ARGBI() method.
PenWidth
The width, in pixel, of the pen used to draw the circle.
AntiAlias
Set to True to apply the Antialiasing algorithm else False.

Return Value

A member of the GdPictureStatus enumeration.
Remarks

This method requires the Image Documents component to run.

Example
Drawing a red circle on a png image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("input.png");
 
    gdpictureImaging.DrawCircle(imageID, 100, 100, 100, gdpictureImaging.ARGBI(255, 255, 0, 0), 1, true);
 
    gdpictureImaging.SaveAsPNG(imageID, "output.png");
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also