THPDFPage.DrawArc

THPDFPage

 

Κορυφή  Προηγούμενο  Επόμενο

Σχεδιάζει arc κατά μήκος της περιμέτρου του ellipse που ορίζεται από το specified rectangle

 

Delphi syntax:

function DrawArc( X1, Y1, X2, Y2, X3, Y3, X4, Y4: Single ):TCurrPoint;

TCurrPoint Type Definition

THPDFCurrPoint defines a point in page coordinates

Unit
HPDFDoc

type
    THPDFCurrPoint = record
        X: Extended;
        Y: Extended;
    end;

Description:
The THPDFCurrPoint type defines a location on the PDF page. X specifies the horizontal coordinate and Y specifies the vertical coordinate.

 

C++ syntax:

TCurrPoint __fastcall DrawArc( float X1, float Y1, float X2, float Y2, float X3, float Y3, float X4, float Y4 );

 

Περιγραφή

Χρησιμοποιήστε το DrawArc για να σχεδιάσετε elliptically curved line. Το arc διατρέχει την περίμετρο ellipse που ορίζεται από τα points (X1,Y1) και (X2,Y2). Το arc σχεδιάζεται ακολουθώντας την περίμετρο του ellipse, counterclockwise, από το starting point έως το ending point. Το starting point ορίζεται από την τομή του ellipse και γραμμής που ορίζεται από το center του ellipse και το (X3,Y3). Το ending point ορίζεται από την τομή του ellipse και γραμμής που ορίζεται από το center του ellipse και το (X4, Y4)

 

Code Example

program ArcExample;
{$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.DrawArc(10, 10, 110, 110, 50, 10, 10, 50); // Draw Arc
        HPDF.CurrentPage.Stroke;                                                    // Stroke curve
        HPDF.EndDoc;                                                                // Close PDF file
    finally
        HPDF.Free;
    end;
end.