|
지정된 rectangle로 둘러싸인 ellipse의 perimeter를 따라 arc를 그립니다
Delphi 구문:
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++ 구문:
TCurrPoint __fastcall DrawArc( float X1, float Y1, float X2, float Y2, float X3, float Y3, float X4, float Y4 );
설명
Elliptically curved line을 그리려면 DrawArc를 사용하십시오. Arc는 (X1,Y1) 및 (X2,Y2) point로 둘러싸인 ellipse의 perimeter를 따라갑니다. Arc는 starting point에서 ending point까지 ellipse perimeter를 counterclockwise로 따라 그려집니다. Starting point는 ellipse와 ellipse center 및 (X3,Y3)로 정의된 line의 intersection입니다. Ending point는 ellipse와 ellipse center 및 (X4, Y4)로 정의된 line의 intersection입니다
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.
|