Mnemonics

'PIE'

Define/Draw Pie Slice

GUI Display/Printer

Formats

1.

Draw Pie (Starting/Ending Angles)

'PIE'(x,y,radius,aspect,angle_1,angle_2)

2.

Draw Pie (Radial Coordinates)

'PIE'(x,y,radius,aspect,startRadialX,startRadialY,endRadialX,endRadialY)

Where: 

angle_1

Angle (in degrees) measured counter clockwise from the right-center (3 o'clock) position of the pie circle to the starting point of the pie slice. Numeric expression.

angle_2

Angle (in degrees) measured counter clockwise from the right-center (3 o'clock) position of the pie circle to the ending point of the pie slice. Numeric expression.

aspect

Aspect ratio/viewpoint. (Ratio=1 results in no tilt.) Numeric expression.

startRadialX
startRadialY

Coordinates along a line that extends from the center of the pie, in graphical units. The point where this line intersects with the pie circle defines the start of the pie slice. Numeric expression.

endRadialX
endRadialY

Coordinates along a line that extends from the center of the pie, in graphical units. The point where this line intersects with the pie circle defines the end of the pie slice. Numeric expression.

radius

Radius of the pie, in graphical units. Numeric expression.

x,y

Coordinates for the center of the pie, in graphical units. Numeric expression.

(Support for the Radial Coordinates format was added in PxPlus 2020.)

Description

Use 'PIE' to draw (print) a pie slice on the device (e.g. terminal). Use graphical units or @X(col) / @Y(line) functions for x,y and radius.

When drawing the pie slice, it can extend in either of two ways:

The 'PIE' mnemonic uses current attributes for the 'FILL' and 'PEN' mnemonics.

For PDFs and Windows graphical drawing, entering a ratio=0 means no ratio. A ratio <0 is invalid and results in an Error 29: Invalid Mnemonic or position specification.

See Also

@X(col) / @Y(line) Convert X/Y Coordinates
'FILL' Define Fill Style

'PEN' Define Pen Style

Example

These examples display a pie cut into two uneven slices:

 

print 'pen'(1,3,8),'fill'(2,6)
print 'pie'(224,450,100,1,45,1)
print 'pen'(1,3,6),'fill'(4,15)
print 'pie'(260,440,100,1,1,45)

 

 

print 'pen'(1,3,8),'fill'(2,6)
print 'pie'(224,450,100,1,274,400,324,447)
print 'pen'(1,3,6),'fill'(4,15)
print 'pie'(260,440,100,1,360,437,310,390)