DynaPDF Manual - Page 335

Previous Page 334   Index   Next Page 336

Function Reference
Page 335 of 839
SI32 PDF_CALL pdfDrawPie(
const PPDF* IPDF,
// Instance pointer
double PosX,
// X-Coordinate of the midpoint of the pie
double PosY,
// Y-Coordinate of the midpoint of the pie
double Width,
// Width of the bounding rectangle
double Height,
// Height of the bounding rectangle
double StartAngle,
// Start angle
double EndAngle,
// End angle
TPathFillMode FillMode) // Fill mode
The function draws a pie-shaped wedge bounded by the intersection of an ellipse and two angles.
The draw direction can be changed with the function SetDrawDirection(). The start and end angles
are always measured counter clockwise independent of the drawing direction.
A pie is a closed path that can be filled, stroked or both. It is also possible to draw a pie invisible to
apply the filling rules nonzero winding number or even-odd. The filling rules are described under
ClipPath(). The parameter FillMode is ignored if the pie is drawn inside a clipping path. The fill
modes are described under ClosePath().
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
Example (Delphi):
uses DynaPDF;
// First we declare an error callback function
function ErrProc(const Data: Pointer; ErrCode: Integer; const ErrMessage:
PAnsiChar; ErrType: Integer): Integer; stdcall;
var s: String;
s := Format('%s'#13'Abort processing?', [ErrMessage]);
if MessageDlg(s, mtError, [mbYes, mbNo], 0) = mrYes then
Result := -1 // break processing
Result := 0; // try to continue

Previous topic: DrawCircle, DrawNGon

Next topic: EditPage, EditTemplate