THPDFPage.CurveToY

THPDFPage

 

Topo  Anterior  Próximo

Draws Y cubic Bezier curve.

 

Sintaxe Delphi:

procedure CurveToY(X1, Y1, X3, Y3: Single);

 

Sintaxe C++:

void __fastcall CurveToY( float X1, float Y1, float X3, float Y3 );

 

Descrição

Chame CurveToY para desenhar Y, uma curva cúbica de Bezier que especifica explicitamente as coordenadas de dois pontos, conforme mostrado na imagem

 

     X1, Y1

  CurveToY control point diagram

Ponto atual

 

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;                                  // Criar o arquivo PDF
        HPDF.CurrentPage.MoveTo( 50, 300 );             // Move first point
        HPDF.CurrentPage.CurveToY( 60, 50, 200, 200 );  // Draw curve
        HPDF.CurrentPage.Stroke;                        // Stroke curve
        HPDF.EndDoc;                                    // Fechar o arquivo PDF
    finally
        HPDF.Free;
    end;
end.