THPDFPage.CurveToY

THPDFPage

 

بالا  قبلی  بعدی

Draws Y cubic Bezier curve.

 

Delphi syntax:

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

 

C++ syntax:

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

 

توضیح

برای رسم منحنی Bezier مکعبی Y با CurveToC فراخوانی کنید که مختصات دو نقطه را به‌صورت صریح مشخص می‌کند، همان‌طور که در تصویر نشان داده شده است

 

     X1, Y1

  CurveToY control point diagram

  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.CurveToY( 60, 50, 200, 200 );  // Draw curve
        HPDF.CurrentPage.Stroke;                        // Stroke curve
        HPDF.EndDoc;                                    // Close PDF file
    finally
        HPDF.Free;
    end;
end.