THPDFPage.MoveTo

THPDFPage

 

トップへ  前へ  次へ

現在の点を移動します。

 

Delphi 構文:

procedure MoveTo ( X, Y: Single );

 

C++ 構文:

void __fastcall MoveTo ( float X, float Y );

 

説明

接続する線分を省略して、現在の点を座標 X, Y に移動することによって、新しいサブパスを開始します。

 

コード例

program LineExample;
{$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名前 := '.\Line.pdf';             // Set PDF filename
        HPDF.BeginDoc;                             // Create PDF file
        HPDF.CurrentPage.MoveTo ( 20, 20 );        // Move current point to 20, 20
        HPDF.CurrentPage.LineTo (  200, 100 );     // Draw line from current point to 200, 100
        HPDF.CurrentPage.Stroke;                   // and stroke
        HPDF.EndDoc;                               // Close PDF file
    finally
        HPDF.Free;
    end;
end.