-
Notifications
You must be signed in to change notification settings - Fork 1
/
draw.d
36 lines (28 loc) · 1.05 KB
/
draw.d
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
import siege.siege;
void main()
{
sgcore.loadModules("SDL", "OpenGL");
sgcore.init(0);
window.open(640, 480, 32, 0);
window.title = "SIEGE D Draw Demo";
while (sgcore.loop()) {
draw.color(0.0, 0.0, 1.0, 1.0);
draw.earc(192, 32, 64, 32, Degrees(0), Degrees(45), false, true);
draw.color(0.0, 1.0, 0.0, 1.0);
draw.earc(320, 32, 64, 32, Degrees(45), Degrees(0), false, true);
draw.color(0.0, 1.0, 1.0, 1.0);
draw.earc(192, 96, 64, 32, Degrees(0), Degrees(45), true, true);
draw.color(1.0, 0.0, 0.0, 1.0);
draw.earc(320, 96, 64, 32, Degrees(45), Degrees(0), true, true);
draw.color(1.0, 1.0, 1.0, 1.0);
draw.ellipse2R(64, 32, 64, 32, true);
draw.ellipse2R(192, 32, 64, 32, false);
draw.ellipse2R(320, 32, 64, 32, false);
draw.ellipse2R(192, 96, 64, 32, false);
draw.ellipse2R(320, 96, 64, 32, false);
draw.color(1.0, 0.0, 0.0, 1.0);
draw.line(64, 160, 192, 288);
window.swapBuffers();
draw.clear();
}
}