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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
-
|
|
-
|
|
!
-
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
!
| #include "user32.as"
#module
#deffunc pline array p1, int p2, int p3, int p4,int p5
redraw 0
sx=p2
sy=p3
if p4>p2:xx=p4-p2:else:xx=p2-p4
if p5>p3:yy=p5-p3:else:yy=p3-p5
if xx>yy{
lop=xx
if yy!0:ss=lop/yy:else:ss=0
}else{
lop=yy
if xx!0:ss=lop/xx:else:ss=0
}
if p2<p4:s1=p4-p2:else:s1=p2-p4
if p3<p5:s2=p5-p3:else:s2=p3-p5
ssss=int(sqrt(s1*s1+s2*s2))+1
lorgb=ginfo_r,ginfo_g,ginfo_b
switch p1(0)
case -1
gmode 1
swbreak
case 0
gmode 4,,,256
color 255,255,255
swbreak
case 1
gmode 2
swbreak
case 2
gmode 2 swbreak
swend
repeat ssss
dir=atan(p4-p2,p5-p3)
x=sin(dir)*cnt+p2:y=cos(dir)*cnt+p3
pos x-9,y-9:gcopy p1(1),p1(2),p1(3),p1(4),p1(5)
loop
color lorgb(0),lorgb(1),lorgb(2)
redraw 1
return
#global
buffer 2
sysfont 17
mes "☆"
gsel 0
dim rect,5
repeat
getkey key,1
if key=1{
if flag=0:SetCapture(hwnd):flag=1
GetWindowRect hwnd,varptr(rect)
pen=0,2,0,0,12,12
pline pen,mousex,mousey,lox,loy
lmx=mousex
lmy=mousey
}else{
if flag=1:ReleaseCapture
flag=0
}
lox=mousex
loy=mousey
await 10
loop
stop
return
|