PDFPAGE_Arc2
IPDFDocument3 :: PDF page methods

See Also Example
Collapse All

This method creates an elliptically curved path between angles.

Syntax

HRESULT PDFPAGE_Arc2 (
DOUBLE centerX,
DOUBLE centerY,
DOUBLE radiusX,
DOUBLE radiusY,
DOUBLE degreeStartAngle,
DOUBLE degreeSweepAngle,
DOUBLE* currentX,
DOUBLE* currentY
)
Parameters
centerX
X coordinate of the center of the ellipse center

centerY
Y coordinate of the center of the ellipse

radiusX
Horizontal radius of the ellipse.

radiusY
Vertical radius of the ellipse.

degreeStartAngle
Start angle of the arc.

degreeSweepAngle
Sweep angle of the arc.

currentX
X coordinate of the current point of the arc

currentY
Y coordinate of the current point of the arc

Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.

Remarks

This method draws a path as a part of an ellipse whose center is a point (centerX, centerY) and radius defined by the pair (radiusX, radiusY). The arc is drawn following the perimeter of the ellipse, counterclockwise, from the starting point to the sweeping angle degreeSweepAngle. The starting point is defined by the intersection of the ellipse and a line drawn by the angle degreeStartAngle. Both angles are measured in degrees. This method returns the current point position specified by the last two parameters.

Equivalent in new interface: IPDFDocument4::DrawAngleArc.

Example

Drawing an Arc Example

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
currentX := 0;
currentY := 0;
PDF.PDFPAGE_MoveTo(300, 300);
PDF.PDFPAGE_Arc2(300, 300, 200, 200, 45, 90, currentX, currentY);
PDF.PDFPAGE_LineTo(300, 300);
PDF.PDFPAGE_Stroke;
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
DOUBLE currentX = 0;
DOUBLE currentY = 0;
PDF->PDFPAGE_MoveTo(300, 300);
PDF->PDFPAGE_Arc2(300, 300, 200, 200, 45, 90, &currentX, &currentY);
PDF->PDFPAGE_LineTo(300, 300);
PDF->PDFPAGE_Stroke();
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
double currentX = 0;
double currentY = 0;
PDF.PDFPAGE_MoveTo(300, 300);
PDF.PDFPAGE_Arc2(300, 300, 200, 200, 45, 90, out currentX, out currentY);
PDF.PDFPAGE_LineTo(300, 300);
PDF.PDFPAGE_Stroke();
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
currentX = 0
currentY = 0
PDF.PDFPAGE_MoveTo 300, 300
PDF.PDFPAGE_Arc2 300, 300, 200, 200, 45, 90, currentX, currentY
PDF.PDFPAGE_LineTo 300, 300
PDF.PDFPAGE_Stroke
PDF.EndDoc

See Also

Reference