PDFPAGE_Pie2
IPDFDocument3 :: PDF page methods

See Also Example
Collapse All

This method creates an elliptical pie-shaped path between angles.

Syntax

HRESULT PDFPAGE_Pie2 (
DOUBLE left,
DOUBLE top,
DOUBLE right,
DOUBLE bottom,
DOUBLE degreeStartAngle,
DOUBLE degreeSweepAngle
)
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

degreeStartAngle
Start angle.

degreeSweepAngle
Sweep angle.

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 pie 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. The method returns the current point position in the last two parameters.

Equivalent in new interface: IPDFDocument4::DrawAnglePie.

Example

Pie Chart Examples

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
PDF.PDFPAGE_Width := 300;
PDF.PDFPAGE_Height := 300;
PDF.PDFPAGE_Pie(100, 100, 200, 200, 100, 150, 200, 200);
PDF.PDFPAGE_Pie2(100, 100, 200, 200, 45, 90);
PDF.PDFPAGE_Stroke;
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
PDF->PDFPAGE_Width = 300;
PDF->PDFPAGE_Height = 300;
PDF->PDFPAGE_Pie(100, 100, 200, 200, 100, 150, 200, 200);
PDF->PDFPAGE_Pie2(100, 100, 200, 200, 45, 90);
PDF->PDFPAGE_Stroke();
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
PDF.PDFPAGE_Width = 300;
PDF.PDFPAGE_Height = 300;
PDF.PDFPAGE_Pie(100, 100, 200, 200, 100, 150, 200, 200);
PDF.PDFPAGE_Pie2(100, 100, 200, 200, 45, 90);
PDF.PDFPAGE_Stroke();
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
PDF.PDFPAGE_Width = 300
PDF.PDFPAGE_Height = 300
PDF.PDFPAGE_Pie 100, 100, 200, 200, 100, 150, 200, 200
PDF.PDFPAGE_Pie2 100, 100, 200, 200, 45, 90
PDF.PDFPAGE_Stroke
PDF.EndDoc

See Also

Reference