Reference Guide
GdPicture14 Namespace / GdPictureImaging Class / DrawGradientCurve 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.
Starting of the curve, as Color object. A suitable color value can be obtained by using the ARGB() method.
Ending color of the gradient curve, as Color object. 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
    DrawGradientCurve Method
    In This Topic
    Draws a linear gradient curve on a GdPicture image.
    Syntax
    'Declaration
     
    
    Public Function DrawGradientCurve( _
       ByVal ImageID As Integer, _
       ByVal arPoints() As Point, _
       ByVal PenWidth As Integer, _
       ByVal StartColor As Color, _
       ByVal EndColor As Color, _
       ByVal AntiAlias As Boolean _
    ) As GdPictureStatus
    public GdPictureStatus DrawGradientCurve( 
       int ImageID,
       Point[] arPoints,
       int PenWidth,
       Color StartColor,
       Color EndColor,
       bool AntiAlias
    )
    public function DrawGradientCurve( 
        ImageID: Integer;
        arPoints: Pointarray of;
        PenWidth: Integer;
        StartColor: Color;
        EndColor: Color;
        AntiAlias: Boolean
    ): GdPictureStatus; 
    public function DrawGradientCurve( 
       ImageID : int,
       arPoints : Point[],
       PenWidth : int,
       StartColor : Color,
       EndColor : Color,
       AntiAlias : boolean
    ) : GdPictureStatus;
    public: GdPictureStatus DrawGradientCurve( 
       int ImageID,
       Point[]* arPoints,
       int PenWidth,
       Color StartColor,
       Color EndColor,
       bool AntiAlias
    ) 
    public:
    GdPictureStatus DrawGradientCurve( 
       int ImageID,
       array<Point>^ arPoints,
       int PenWidth,
       Color StartColor,
       Color EndColor,
       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.
    StartColor
    Starting of the curve, as Color object. A suitable color value can be obtained by using the ARGB() method.
    EndColor
    Ending color of the gradient curve, as Color object. 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 linear gradient curve on a GdPicture image.
    using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
    {
        Point[] points = new Point[] {
            new Point(200,100),
            new Point(350,150),
            new Point(300,250),
            new Point(150,200),
        };
        int penWidth = 10;
        Color startColor = Color.Blue, endColor = Color.Yellow;
        int imageID = gdpictureImaging.CreateNewGdPictureImage(400, 400, System.Drawing.Imaging.PixelFormat.Format24bppRgb, Color.White);
     
        // Draw gradient curve. The AntiAlias parameter is set to true to apply antialiasing algorithm, i.e. to improve the appearance of the curve boundary.
        gdpictureImaging.DrawGradientCurve(imageID, points, penWidth, startColor, endColor, true);
     
        gdpictureImaging.SaveAsPNG(imageID, "output.png");
     
        // Release used resources.
        gdpictureImaging.ReleaseGdPictureImage(imageID);
    }
    See Also