PDFPAGE_ArcTo
IPDFDocument3 :: PDF page methods

See Also Example
Collapse All

This method creates an elliptically curved path between points.

Syntax

HRESULT PDFPAGE_ArcTo (
DOUBLE left,
DOUBLE top,
DOUBLE right,
DOUBLE bottom,
DOUBLE firstX,
DOUBLE firstY,
DOUBLE secondX,
DOUBLE secondY,
VARIANT_BOOL isClockwise,
DOUBLE* currentX,
DOUBLE* currentY
)
Parameters
left
X coordinate of the top-left corner of the bounding rectangle

top
Y coordinate of the top-left corner of the bounding rectangle

right
X coordinate of the bottom-right corner of the bounding rectangle

bottom
Y coordinate of the bottom-right corner of the bounding rectangle

firstX
X coordinate of the 1st point

firstY
Y coordinate of the 1st point

secondX
X coordinate of the 2nd point

secondY
Y coordinate of the 2nd point

isClockwise
Draw clockwise when true or counterclockwise when false

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 that is bounded by the rectangle with left-top corner (left, top) and right-bottom corner (right, bottom). The arc is drawn following the perimeter of the ellipse, in the isClockwise direction, from the starting point to the ending point. The starting point is defined by the intersection of the ellipse and a line drawn from the center of the ellipse to the point (firstX, firstY). The ending point is defined by the intersection of the ellipse and a line drawn from the center of the ellipse to the point (secondX, secondY). This method returns the current point position specified by the two last parameters.

Equivalent in new interface: IPDFDocument4::DrawArcTo.

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(100, 150);
PDF.PDFPAGE_ArcTo(100, 100, 200, 200, 150, 100, 100, 150, false, currentX, currentY);
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(100, 150);
PDF->PDFPAGE_ArcTo(100, 100, 200, 200, 150, 100, 100, 150, FALSE, &currentX, &currentY);
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(100, 150);
PDF.PDFPAGE_ArcTo(100, 100, 200, 200, 150, 100, 100, 150, false, out currentX, out currentY);
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 100, 150
PDF.PDFPAGE_ArcTo 100, 100, 200, 200, 150, 100, 100, 150, False, currentX, currentY
PDF.PDFPAGE_Stroke
PDF.EndDoc

See Also

Reference