AddCurveToPath3 Method (GdPicturePDF)
                In This Topic
            
            Appends a cubic Bézier curve to the current path, defined within a currently selected page of the loaded PDF document. More precisely, this method sets the path construction operator "c". The curve expands the current path from the current point to the end-point (X3, Y3), using (X1, Y1) and (X2, Y2) as the Bézier control points. Be aware of your currently defined graphics state parameters, that subsequent filling and stroking operations applied onto the constructed path put into effect. 
All specified coordinates need to be set in the current units defined in the PDF document with respect to the currently located origin, related to the actual page. You can use the GdPicturePDF.GetMeasurementUnit method to determine the currently defined units and you can use the GdPicturePDF.SetMeasurementUnit method to reset the units according to your preference.
Syntax
            
            
            
            
            'Declaration
 
Public Function AddCurveToPath3( _
   ByVal  As Single, _
   ByVal  As Single, _
   ByVal  As Single, _
   ByVal  As Single, _
   ByVal  As Single, _
   ByVal  As Single _
) As GdPictureStatus
             
        
            
            public GdPictureStatus AddCurveToPath3( 
   float ,
   float ,
   float ,
   float ,
   float ,
   float 
)
             
        
            
            public function AddCurveToPath3( 
    : Single;
    : Single;
    : Single;
    : Single;
    : Single;
    : Single
): GdPictureStatus; 
             
        
            
            public function AddCurveToPath3( 
    : float,
    : float,
    : float,
    : float,
    : float,
    : float
) : GdPictureStatus;
             
        
            
            public: GdPictureStatus AddCurveToPath3( 
   float ,
   float ,
   float ,
   float ,
   float ,
   float 
) 
             
        
            
            public:
GdPictureStatus AddCurveToPath3( 
   float ,
   float ,
   float ,
   float ,
   float ,
   float 
) 
             
        
             
        
            Parameters
- X1
- The horizontal (X) coordinate of the first Bézier control point, expressed in the current units specified by the SetMeasurementUnit method with respect to the defined origin, related to the currently selected page.
- Y1
- The vertical (Y) coordinate of the first Bézier control point, expressed in the current units specified by the SetMeasurementUnit method with respect to the defined origin, related to the currently selected page.
- X2
- The horizontal (X) coordinate of the second Bézier control point, expressed in the current units specified by the SetMeasurementUnit method with respect to the defined origin, related to the currently selected page.
- Y2
- The vertical (Y) coordinate of the second Bézier control point, expressed in the current units specified by the SetMeasurementUnit method with respect to the defined origin, related to the currently selected page.
- X3
- The horizontal (X) coordinate of the curve's end point, expressed in the current units specified by the SetMeasurementUnit method with respect to the defined origin, related to the currently selected page.
- Y3
- The vertical (Y) coordinate of the curve's end point, expressed in the current units specified by the SetMeasurementUnit method with respect to the defined origin, related to the currently selected page.
Return Value
A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK. 
We strongly recommend always checking this status first.
 
            
            
            
            
            
            Example
How to add a cubic Bézier curve to the current path.
            
            
            
             
    
	
		Dim caption As String = "Example: AddCurveToPath3"
Dim gdpicturePDF As New GdPicturePDF()
Dim status As GdPictureStatus = gdpicturePDF.NewPDF()
If status = GdPictureStatus.OK Then
    gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft)
    If (gdpicturePDF.NewPage(PdfPageSizes.PdfPageSizeA4) = GdPictureStatus.OK) AndAlso
       (gdpicturePDF.SetFillColor(128, 128, 0) = GdPictureStatus.OK) AndAlso
       (gdpicturePDF.BeginPath(50, 20) = GdPictureStatus.OK) AndAlso
       (gdpicturePDF.AddCurveToPath1(10, 500, 200, 400) = GdPictureStatus.OK) AndAlso
       (gdpicturePDF.FillPath() = GdPictureStatus.OK) AndAlso
       (gdpicturePDF.BeginPath(550, 20) = GdPictureStatus.OK) AndAlso
       (gdpicturePDF.AddCurveToPath2(510, 500, 300, 400) = GdPictureStatus.OK) AndAlso
       (gdpicturePDF.FillPath() = GdPictureStatus.OK) AndAlso
       (gdpicturePDF.BeginPath(50, 750) = GdPictureStatus.OK) AndAlso
       (gdpicturePDF.AddCurveToPath3(10, 550, 300, 480, 500, 600) = GdPictureStatus.OK) AndAlso
       (gdpicturePDF.FillPath() = GdPictureStatus.OK) Then
        status = gdpicturePDF.SaveToFile("test_AddCurveToPath3.pdf")
        If status = GdPictureStatus.OK Then
            MessageBox.Show("The example has been followed successfully and the file has been saved.", caption)
        Else
            MessageBox.Show("The example has been followed successfully, but the file can't be saved. Status: " + status.ToString(), caption)
        End If
    Else
        MessageBox.Show("The example has not been followed successfully." + vbCrLf + "The last known status is " + gdpicturePDF.GetStat().ToString(), caption)
    End If
Else
    MessageBox.Show("The NewPDF() method has failed with the status: " + status.ToString(), caption)
End If
gdpicturePDF.Dispose()
	 
	
		string caption = "Example: AddCurveToPath3";
GdPicturePDF gdpicturePDF = new GdPicturePDF();
GdPictureStatus status = gdpicturePDF.NewPDF();
if (status == GdPictureStatus.OK)
{
    gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft);
    if ((gdpicturePDF.NewPage(PdfPageSizes.PdfPageSizeA4) == GdPictureStatus.OK) &&
        (gdpicturePDF.SetFillColor(128, 128, 0) == GdPictureStatus.OK) &&
        (gdpicturePDF.BeginPath(50, 20) == GdPictureStatus.OK) &&
        (gdpicturePDF.AddCurveToPath1(10, 500, 200, 400) == GdPictureStatus.OK) &&
        (gdpicturePDF.FillPath() == GdPictureStatus.OK) &&
        (gdpicturePDF.BeginPath(550, 20) == GdPictureStatus.OK) &&
        (gdpicturePDF.AddCurveToPath2(510, 500, 300, 400) == GdPictureStatus.OK) &&
        (gdpicturePDF.FillPath() == GdPictureStatus.OK) &&
        (gdpicturePDF.BeginPath(50, 750) == GdPictureStatus.OK) &&
        (gdpicturePDF.AddCurveToPath3(10, 550, 300, 480, 500, 600) == GdPictureStatus.OK) &&
        (gdpicturePDF.FillPath() == GdPictureStatus.OK))
    {
        status = gdpicturePDF.SaveToFile("test_AddCurveToPath3.pdf");
        if (status == GdPictureStatus.OK)
            MessageBox.Show("The example has been followed successfully and the file has been saved.", caption);
        else
            MessageBox.Show("The example has been followed successfully, but the file can't be saved. Status: " + status.ToString(), caption);
    }
    else
        MessageBox.Show("The example has not been followed successfully.\nThe last known status is " + gdpicturePDF.GetStat().ToString(), caption);
}
else
    MessageBox.Show("The NewPDF() method has failed with the status: " + status.ToString(), caption);
gdpicturePDF.Dispose();
	 
	
 
Example
How to add a cubic Bézier curve to the current path.
            
            Dim caption As String = "Example: AddCurveToPath3"
            Dim gdpicturePDF As New GdPicturePDF()
            Dim status As GdPictureStatus = gdpicturePDF.NewPDF()
            If status = GdPictureStatus.OK Then
                gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft)
                If (gdpicturePDF.NewPage(PdfPageSizes.PdfPageSizeA4) = GdPictureStatus.OK) AndAlso
                   (gdpicturePDF.SetFillColor(128, 128, 0) = GdPictureStatus.OK) AndAlso
                   (gdpicturePDF.BeginPath(50, 20) = GdPictureStatus.OK) AndAlso
                   (gdpicturePDF.AddCurveToPath1(10, 500, 200, 400) = GdPictureStatus.OK) AndAlso
                   (gdpicturePDF.FillPath() = GdPictureStatus.OK) AndAlso
                   (gdpicturePDF.BeginPath(550, 20) = GdPictureStatus.OK) AndAlso
                   (gdpicturePDF.AddCurveToPath2(510, 500, 300, 400) = GdPictureStatus.OK) AndAlso
                   (gdpicturePDF.FillPath() = GdPictureStatus.OK) AndAlso
                   (gdpicturePDF.BeginPath(50, 750) = GdPictureStatus.OK) AndAlso
                   (gdpicturePDF.AddCurveToPath3(10, 550, 300, 480, 500, 600) = GdPictureStatus.OK) AndAlso
                   (gdpicturePDF.FillPath() = GdPictureStatus.OK) Then
                    status = gdpicturePDF.SaveToFile("test_AddCurveToPath3.pdf")
                    If status = GdPictureStatus.OK Then
                        MessageBox.Show("The example has been followed successfully and the file has been saved.", caption)
                    Else
                        MessageBox.Show("The example has been followed successfully, but the file can't be saved. Status: " + status.ToString(), caption)
                    End If
                Else
                    MessageBox.Show("The example has not been followed successfully." + vbCrLf + "The last known status is " + gdpicturePDF.GetStat().ToString(), caption)
                End If
            Else
                MessageBox.Show("The NewPDF() method has failed with the status: " + status.ToString(), caption)
            End If
            gdpicturePDF.Dispose()
            
            string caption = "Example: AddCurveToPath3";
            GdPicturePDF gdpicturePDF = new GdPicturePDF();
            GdPictureStatus status = gdpicturePDF.NewPDF();
            if (status == GdPictureStatus.OK)
            {
                gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginTopLeft);
                if ((gdpicturePDF.NewPage(PdfPageSizes.PdfPageSizeA4) == GdPictureStatus.OK) &&
                    (gdpicturePDF.SetFillColor(128, 128, 0) == GdPictureStatus.OK) &&
                    (gdpicturePDF.BeginPath(50, 20) == GdPictureStatus.OK) &&
                    (gdpicturePDF.AddCurveToPath1(10, 500, 200, 400) == GdPictureStatus.OK) &&
                    (gdpicturePDF.FillPath() == GdPictureStatus.OK) &&
                    (gdpicturePDF.BeginPath(550, 20) == GdPictureStatus.OK) &&
                    (gdpicturePDF.AddCurveToPath2(510, 500, 300, 400) == GdPictureStatus.OK) &&
                    (gdpicturePDF.FillPath() == GdPictureStatus.OK) &&
                    (gdpicturePDF.BeginPath(50, 750) == GdPictureStatus.OK) &&
                    (gdpicturePDF.AddCurveToPath3(10, 550, 300, 480, 500, 600) == GdPictureStatus.OK) &&
                    (gdpicturePDF.FillPath() == GdPictureStatus.OK))
                {
                    status = gdpicturePDF.SaveToFile("test_AddCurveToPath3.pdf");
                    if (status == GdPictureStatus.OK)
                        MessageBox.Show("The example has been followed successfully and the file has been saved.", caption);
                    else
                        MessageBox.Show("The example has been followed successfully, but the file can't be saved. Status: " + status.ToString(), caption);
                }
                else
                    MessageBox.Show("The example has not been followed successfully.\nThe last known status is " + gdpicturePDF.GetStat().ToString(), caption);
            }
            else
                MessageBox.Show("The NewPDF() method has failed with the status: " + status.ToString(), caption);
            gdpicturePDF.Dispose();
            
            
            
            See Also