Reference Guide
GdPicture14 Namespace / GdPictureImaging Class / DrawClosedCurve Method
GdPicture image identifier.
Array of System.Drawing.Point that specifies the coordinates that the cardinal spline passes through.
The width, in pixel, of the pen used to draw the curve.
Color of the curve. 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
    DrawClosedCurve Method
    In This Topic
    Draws a closed curve on a GdPicture image.
    Syntax
    'Declaration
     
    
    Public Function DrawClosedCurve( _
       ByVal ImageID As Integer, _
       ByVal arPoints() As Point, _
       ByVal PenWidth As Integer, _
       ByVal PenColor As Color, _
       ByVal AntiAlias As Boolean _
    ) As GdPictureStatus
    public GdPictureStatus DrawClosedCurve( 
       int ImageID,
       Point[] arPoints,
       int PenWidth,
       Color PenColor,
       bool AntiAlias
    )
    public function DrawClosedCurve( 
        ImageID: Integer;
        arPoints: Pointarray of;
        PenWidth: Integer;
        PenColor: Color;
        AntiAlias: Boolean
    ): GdPictureStatus; 
    public function DrawClosedCurve( 
       ImageID : int,
       arPoints : Point[],
       PenWidth : int,
       PenColor : Color,
       AntiAlias : boolean
    ) : GdPictureStatus;
    public: GdPictureStatus DrawClosedCurve( 
       int ImageID,
       Point[]* arPoints,
       int PenWidth,
       Color PenColor,
       bool AntiAlias
    ) 
    public:
    GdPictureStatus DrawClosedCurve( 
       int ImageID,
       array<Point>^ arPoints,
       int PenWidth,
       Color PenColor,
       bool AntiAlias
    ) 

    Parameters

    ImageID
    GdPicture image identifier.
    arPoints
    Array of System.Drawing.Point that specifies the coordinates that the cardinal spline passes through.
    PenWidth
    The width, in pixel, of the pen used to draw the curve.
    PenColor
    Color of the curve. 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 red closed curve on a png image.
    using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
    {
        int imageID = gdpictureImaging.CreateGdPictureImageFromFile("input.png");
     
        System.Drawing.Point[] points = new System.Drawing.Point[4];
        points[0].X = 100;
        points[0].Y = 50;
        points[1].X = 150;
        points[1].Y = 100;
        points[2].X = 100;
        points[2].Y = 150;
        points[3].X = 50;
        points[3].Y = 100;
     
        gdpictureImaging.DrawClosedCurve(imageID, points, 1, gdpictureImaging.ARGB(255, 255, 0, 0), true);
     
        gdpictureImaging.SaveAsPNG(imageID, "output.png");
        gdpictureImaging.ReleaseGdPictureImage(imageID);
    }
    See Also