Purpose
Draw an elliptical pie slice on a canvas.
Synopsis
procedure XADcanvasdrawpie(id:integer, x:real, y:real, w:real, h:real, start:real, end:real, color1:integer, color2:integer)
Arguments
|
id
|
Canvas identifier
|
|
x
|
x coordinate
|
|
y
|
y coordinate
|
|
w
|
Width of bounding rectangle
|
|
h
|
Height of bounding rectangle
|
|
start
|
Clockwise start percentage [0-100]
|
|
end
|
Clockwise end percentage [0-100]
|
|
color1
|
Border color
|
|
color2
|
Fill color
|
Example
declarations
sizes:array(1..4) of real
colors:array(1..4) of integer
base:real
end-declarations
colors:=[XAD_RED,XAD_GREEN,XAD_MAGENTA,XAD_BLACK]
forall(o in 1..4) sizes(o):=random*35; ! between 0-35%
...
base:=0
forall(o in 1..4) do
!circular pie
XADcanvasdrawpie(id_canvas,100,150,100,100,base,sizes(o),colors(o),colors(o))
base+=sizes(o)
end-do
Further information
Draws a
pie slice
bounded by the given rectangle. The "angle" of the slice must be between [0-100] (percentage) and is measured clockwise
beginning at 12 o'clock. See example.
Related topics
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.