-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdrawpie2.orl
39 lines (36 loc) · 1.01 KB
/
drawpie2.orl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{Page 500-501}
{Set up the environment}
SetWindow(MAXIMIZE)
UseCoordinates(PIXEL)
UseFont("Terminal",10,10,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
Pie1:
UsePen(DOT,1,0,0,0) {Dotted pen for temporary ellipse}
UseBrush(NULL,0,0,0) {Hollow brush for temporary ellipse}
SetMouse(0,0,700,600,Pie2,x1,y1)
DrawText (20, 300,
"Click on upper-left corner of rectangle bounding pie ")
Goto Get_Input
Pie2:
SetMouse(0,0,700,600,Pie3,x2,y2)
DrawText(10,300,
"Click on lower-right corner of rectangle bounding pie")
Goto Get_Input
Pie3:
DrawEllipse(x1,y1,x2,y2)
SetMouse(0,0,700,600,Pie4,x3,y3)
DrawText(10,300,
"Click on one end of arc defining pie ")
Goto Get_Input
Pie4:
SetMouse(0,0,700,600,Pie_End,x4,y4)
DrawText(10,300,
"Click on other end of arc defining pie ")
Goto Get_Input
Pie_End:
DrawBackground
UsePen(SOLID,1,0,0,0)
UseBrush(SOLID,255,0,0)
DrawPie(x1,y1,x2,y2,x3,y3,x4,y4)
Goto Pie1
Get_Input:
WaitInput()