Mercurial > projects > doodle
comparison doodle.d @ 20:d6e7a5a6f008
Checkpoint
author | "David Bryant <bagnose@gmail.com>" |
---|---|
date | Wed, 15 Jul 2009 23:23:02 +0930 |
parents | |
children | 17c2df87b459 |
comparison
equal
deleted
inserted
replaced
19:22abbf4cde96 | 20:d6e7a5a6f008 |
---|---|
1 module doodle; | |
2 | |
3 private { | |
4 import canvas; | |
5 import tool_layer; | |
6 import standard_tools; | |
7 import page_layer; | |
8 | |
9 import gtk.Main; | |
10 import gtk.MainWindow; | |
11 | |
12 import std.stdio; | |
13 } | |
14 | |
15 void main(string[] args) { | |
16 Main.init(args); | |
17 auto window = new MainWindow("Doodle"); | |
18 Tool[] tools; | |
19 tools ~= new PanTool; | |
20 tools ~= new ZoomTool; | |
21 tools ~= new LassoTool; | |
22 auto tool_layer = new ToolLayer(tools, "Tools"); | |
23 Layer[] layers; | |
24 layers ~= new PageLayer("Page"); | |
25 layers ~= tool_layer; | |
26 auto canvas = new Canvas(layers, tool_layer, 120.0); | |
27 window.add(canvas); | |
28 window.setDefaultSize(380, 380); | |
29 window.showAll(); | |
30 Main.run(); | |
31 | |
32 /* | |
33 Point p3 = Point.DEFAULT; | |
34 | |
35 Point p1 = Point(3.0, 5.0); | |
36 writefln("%s", p1); | |
37 | |
38 Point p2 = Point(1.0, 2.0); | |
39 writefln("%s", p2); | |
40 | |
41 writefln("%s", p1 - p2); | |
42 | |
43 Rectangle r = Rectangle(p1, p2); | |
44 writefln("%s", r); | |
45 */ | |
46 } |