Xojo Conferences
MBSOct2019CologneDE

DynaPDF Manual - Page 301

Previous Page 300   Index   Next Page 302

Function Reference
Page 301 of 770
DrawPie
Syntax:
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):
implementation
uses DynaPDF;
// First we declare an error callback function
function ErrProc(const Data: Pointer; ErrCode: Integer; const ErrMessage:
PChar; ErrType: Integer): Integer; stdcall;
var s: String;
begin
s := Format('%s'#13'Abort processing?', [ErrMessage]);
if MessageDlg(s, mtError, [mbYes, mbNo], 0) = mrYes then
Result := -1 // break processing
else
Result := 0; // try to continue
end;
 

Previous topic: DrawCircle

Next topic: EditPage, EditTemplate