HotPDF Delphi PDF Component Developer Guide loslab Logo

 

THPDFPage.CurveToV

THPDFPage

 

Top  Previous  Next

Draws V cubic Bezier curve.

 

Delphi syntax:

procedure CurveToV( X2, Y2, X3, Y3: Single );

 

C++ syntax:

void __fastcall CurveToV( float X2, float Y2, float X3, float Y3 );

 

Description

Call CurveToC to draw V cubic Bezier curve specifies the coordinates of two points explicitly, as shown in picture.

 

                                          X2, Y2

clip0004

Current Point

 

Code Example

program CurveExample;
{$APPTYPE CONSOLE}
uses
    SysUtils, Graphics, Classes, HPDFDoc;

var
    HPDF: THotPDF;

begin
    HPDF := THotPDF.Create( nil );
    try
        HPDF.AutoLaunch := true;                        // PDF file will be shown automatically
        HPDF.FileName := '.\Curve.pdf';                 // Set PDF filename
        HPDF.BeginDoc;                                  // Create PDF file
        HPDF.CurrentPage.MoveTo( 50, 300 );             // Move first point
        HPDF.CurrentPage.CurveToV(150, 50, 200, 200);   // Draw curve
        HPDF.CurrentPage.Stroke;                        // Stroke curve
        HPDF.EndDoc;                                    // Close PDF file
    finally
        HPDF.Free;
    end;
end.

 

Copyright©2007-2025 losLab.com