Mercurial > projects > doodle
comparison grid_layer.d @ 11:fb571a3b1f0d
Checkpoint
author | "David Bryant <bagnose@gmail.com>" |
---|---|
date | Sat, 11 Jul 2009 23:32:22 +0930 |
parents | |
children | a093c4fbdd43 |
comparison
equal
deleted
inserted
replaced
10:71ca82e0eb76 | 11:fb571a3b1f0d |
---|---|
1 import icanvas; | |
2 import tk.geometry; | |
3 import cairo.Context; | |
4 import cairo_support; | |
5 import std.math; | |
6 | |
7 interface Grid { | |
8 } | |
9 | |
10 class GridLayer : Layer, Grid { | |
11 override Rectangle bounds() const { | |
12 // We don't require any geometry | |
13 return Rectangle(); | |
14 } | |
15 | |
16 override void draw(const Viewport viewport, in Rectangle damage, Context cr) const { | |
17 double zoom = viewport.zoom; | |
18 | |
19 double start_x = modf(damage.min_corner.x, zoom); | |
20 } | |
21 | |
22 private { | |
23 } | |
24 } |