Mercurial > projects > doodle
annotate doodle/dia/grid_layer.d @ 34:c2f11e1d7470
Geometry cleanup and checkpoint.
author | David Bryant <bagnose@gmail.com> |
---|---|
date | Sun, 30 Aug 2009 15:32:12 +0930 |
parents | 1754cb773d41 |
children | 3f6bb0bb22dc |
rev | line source |
---|---|
28
1754cb773d41
Part-way through getting to compile with configure/builder.
Graham St Jack <graham.stjack@internode.on.net>
parents:
27
diff
changeset
|
1 module doodle.dia.grid_layer; |
16
9e63308b749c
* Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents:
12
diff
changeset
|
2 |
24 | 3 public { |
28
1754cb773d41
Part-way through getting to compile with configure/builder.
Graham St Jack <graham.stjack@internode.on.net>
parents:
27
diff
changeset
|
4 import doodle.dia.icanvas; |
24 | 5 } |
6 | |
7 private { | |
28
1754cb773d41
Part-way through getting to compile with configure/builder.
Graham St Jack <graham.stjack@internode.on.net>
parents:
27
diff
changeset
|
8 import doodle.cairo.routines; |
24 | 9 import std.math; |
10 } | |
11 | 11 |
12 interface Grid { | |
34
c2f11e1d7470
Geometry cleanup and checkpoint.
David Bryant <bagnose@gmail.com>
parents:
28
diff
changeset
|
13 //void zoom_changed(); |
11 | 14 } |
15 | |
16 class GridLayer : Layer, Grid { | |
24 | 17 this(in string name) { |
18 super(name); | |
19 } | |
20 | |
11 | 21 override Rectangle bounds() const { |
22 // We don't require any geometry | |
23 return Rectangle(); | |
24 } | |
25 | |
26 | 26 override void draw(in Viewport viewport, |
24 | 27 in Rectangle pixel_damage, scope Context pixel_cr, |
28 in Rectangle model_damage, scope Context model_cr) const { | |
27 | 29 //double zoom = viewport.zoom; |
11 | 30 |
24 | 31 //double start_x = modf(damage.min_corner.x, zoom); |
11 | 32 } |
33 | |
34 private { | |
35 } | |
36 } |