Mercurial > projects > doodle
annotate dia/grid_layer.d @ 22:17c2df87b459
Package refactoring.
author | "David Bryant <bagnose@gmail.com>" |
---|---|
date | Wed, 15 Jul 2009 23:31:29 +0930 |
parents | grid_layer.d@c643c04e3f5e |
children | a24c13bb9c98 |
rev | line source |
---|---|
22 | 1 module dia.grid_layer; |
16
9e63308b749c
* Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents:
12
diff
changeset
|
2 |
17 | 3 // TODO fix imports |
11 | 4 import icanvas; |
5 import tk.geometry; | |
6 import cairo.Context; | |
7 import cairo_support; | |
8 import std.math; | |
9 | |
10 interface Grid { | |
11 } | |
12 | |
13 class GridLayer : Layer, Grid { | |
14 override Rectangle bounds() const { | |
15 // We don't require any geometry | |
16 return Rectangle(); | |
17 } | |
18 | |
12 | 19 override void draw(const Viewport viewport, in Rectangle damage, |
20 Context model_cr, Context screen_cr) const { | |
11 | 21 double zoom = viewport.zoom; |
22 | |
23 double start_x = modf(damage.min_corner.x, zoom); | |
24 } | |
25 | |
26 private { | |
27 } | |
28 } |