THPDFPage.DrawArc

THPDFPage

 

トップへ  前へ  次へ

指定された四角形で囲まれた楕円の周囲に沿って円弧を描画します。

 

Delphi 構文:

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

TCurrPoint 型定義

THPDFCurrPoint defines a point in page coordinates

ユニット
HPDFDoc

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

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

 

C++ 構文:

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

 

説明

DrawArc を使用して楕円曲線の線を描画します。円弧は、点 (X1,Y1) と (X2,Y2) で囲まれた楕円の周囲をたどります。円弧は、開始点から終了点まで、反時計回りに楕円の周囲に沿って描画されます。開始点は、楕円と、楕円の中心と (X3,Y3) によって定義される線の交点によって定義されます。終了点は、楕円と、楕円の中心と (X4,Y4) によって定義される線の交点によって定義されます。

 

コード例

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.File名前 := '.\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.