Reference Guide
GdPicture14 Namespace / GdPictureImaging Class / DrawFilledCircle Method / DrawFilledCircle(Int32,Int32,Int32,Int32,Color,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.
Color of the circle. A suitable color value can be obtained by using the ARGB() method.
Set to True to apply the Antialiasing algorithm else False.
Example





In This Topic
    DrawFilledCircle(Int32,Int32,Int32,Int32,Color,Boolean) Method
    In This Topic
    Draws a filled circle on a GdPicture image.
    Syntax
    'Declaration
     
    
    Public Overloads Function DrawFilledCircle( _
       ByVal ImageID As Integer, _
       ByVal DstLeft As Integer, _
       ByVal DstTop As Integer, _
       ByVal Diameter As Integer, _
       ByVal FillColor As Color, _
       ByVal AntiAlias As Boolean _
    ) As GdPictureStatus
    public GdPictureStatus DrawFilledCircle( 
       int ImageID,
       int DstLeft,
       int DstTop,
       int Diameter,
       Color FillColor,
       bool AntiAlias
    )
    public function DrawFilledCircle( 
        ImageID: Integer;
        DstLeft: Integer;
        DstTop: Integer;
        Diameter: Integer;
        FillColor: Color;
        AntiAlias: Boolean
    ): GdPictureStatus; 
    public function DrawFilledCircle( 
       ImageID : int,
       DstLeft : int,
       DstTop : int,
       Diameter : int,
       FillColor : Color,
       AntiAlias : boolean
    ) : GdPictureStatus;
    public: GdPictureStatus DrawFilledCircle( 
       int ImageID,
       int DstLeft,
       int DstTop,
       int Diameter,
       Color FillColor,
       bool AntiAlias
    ) 
    public:
    GdPictureStatus DrawFilledCircle( 
       int ImageID,
       int DstLeft,
       int DstTop,
       int Diameter,
       Color FillColor,
       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.
    FillColor
    Color of the circle. A suitable color value can be obtained by using the ARGB() method.
    AntiAlias
    Set to True to apply the Antialiasing algorithm else False.

    Return Value

    A member of the GdPictureStatus enumeration.
    Example
    Drawing a filled circle.
    Rendering an image with a circle onto the background image and saving the result into a png file.
    using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
    {
        Color backColor = gdpictureImaging.ARGB(255, 0, 255, 0); // Green color
        Color circleColor = gdpictureImaging.ARGB(255, 255, 0, 0); // Red color
     
        // Create a background image.
        int backImage = gdpictureImaging.CreateNewGdPictureImage(320, 200, 32, backColor);
     
        // Create an image used for drawing, and draw a circle on it.
        int circleImage = gdpictureImaging.CreateNewGdPictureImage(80, 80, 32, gdpictureImaging.ARGB(0, 0, 0, 0));
        gdpictureImaging.DrawFilledCircle(circleImage, 40, 40, 60, circleColor, false);
     
        // Draw an image with a circle onto the background image.
        gdpictureImaging.DrawGdPictureImage(circleImage, backImage, 0, 0, 80, 80, System.Drawing.Drawing2D.InterpolationMode.Default);
        gdpictureImaging.SaveAsPNG(backImage, "output.png");
     
        // Release used resources.
        gdpictureImaging.ReleaseGdPictureImage(circleImage);
        gdpictureImaging.ReleaseGdPictureImage(backImage);
    }
    Filling a green circle with a center at 200, 250 and a diameter of 100 pixels.
    using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
    {
        int centerX = 200, centerY = 250, diameter = 100;
        int imageID = gdpictureImaging.CreateNewGdPictureImage(400, 400, System.Drawing.Imaging.PixelFormat.Format24bppRgb, Color.White);
     
        // Fill the circle. The AntiAlias parameter is set to true to apply antialiasing algorithm, i.e. to improve the appearance of the circle boundary.
        gdpictureImaging.DrawFilledCircle(imageID, centerX, centerY, diameter, Color.Green, true);
     
        gdpictureImaging.SaveAsPNG(imageID, "output.png");
     
        // Release used resources.
        gdpictureImaging.ReleaseGdPictureImage(imageID);
    }
    See Also