GdPicture.NET Reference Guide
DrawClosedCurve Method
Example 





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.
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 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;

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 closed curve on the image.
Dim oGdPictureImaging As New GdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("input.png")
If imageId <> 0 Then
   Dim Points(3) As Point
   Points(0).X = 50
   Points(0).Y = 50
   Points(1).X = 120
   Points(1).Y = 80
   Points(2).X = 260
   Points(2).Y = 20
   oGdPictureImaging.DrawClosedCurve(ImageID, Points, 10, oGdPictureImaging.ARGB(255,0,0,0), True)
   oGdPictureImaging.SaveAsPNG(ImageID, "output.png")
   oGdPictureImaging.ReleaseGdPictureImage(ImageID)
Else
   MessageBox.Show("Error: " + oGdPictureImaging.GetStat().ToString())
End If
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members