|
Draws line.
Sintaxis Delphi:
procedure LineTo ( X, Y: Single );
Sintaxis C++:
void __fastcall LineTo ( float X, float Y );
Descripción
Agrega un segmento de línea recta desde el punto actual hasta el punto X, Y. El nuevo punto actual es X, Y
Ejemplo de código
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.FileName := '.\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.
|