Sign in Join
FPDoc Onlineexperiment

TCanvas.Pie procedure

Member of TCanvaspublicIn unit Graphics

Pie draws a filled pie-shaped wedge on the canvas.

Declaration

pascal
procedure Pie(EllipseX1: Integer; EllipseY1: Integer; 
 EllipseX2: Integer; EllipseY2: Integer; StartX: Integer; 
 StartY: Integer; EndX: Integer; EndY: Integer); virtual

Description

Pie is a method for drawing a filled pie-shaped wedge on the canvas. The pie is formed by an arc along the ellipse circumference and straight line from the ellipse center to the arc's start and end points.

The ellipse is defined by the enclosing rectangle given by the corner coordinates EllipseX1, EllipseY1, EllipseX2, EllipseY2. The values StartX, StartY as well as EndX, EndY define the starting and ending radial-points between which the bounding arc is drawn. But note that these points do not necessarily have to lie exactly on the arc itself. Instead of that, the intersection points of the ellipse with the lines from the ellipse center to the points (StartX, StartY) and (EndX, EndY), respectively, are calculated automatically.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.