Mercurial > projects > doodle
comparison dia/grid_layer.d @ 24:a24c13bb9c98
Builds again.
author | "David Bryant <bagnose@gmail.com>" |
---|---|
date | Wed, 15 Jul 2009 23:39:29 +0930 |
parents | 17c2df87b459 |
children | 06c30d250c0a |
comparison
equal
deleted
inserted
replaced
23:d5cd97f55cb6 | 24:a24c13bb9c98 |
---|---|
1 module dia.grid_layer; | 1 module dia.grid_layer; |
2 | 2 |
3 // TODO fix imports | 3 public { |
4 import icanvas; | 4 import dia.icanvas; |
5 import tk.geometry; | 5 } |
6 import cairo.Context; | 6 |
7 import cairo_support; | 7 private { |
8 import std.math; | 8 import cairo.routines; |
9 import std.math; | |
10 } | |
9 | 11 |
10 interface Grid { | 12 interface Grid { |
11 } | 13 } |
12 | 14 |
13 class GridLayer : Layer, Grid { | 15 class GridLayer : Layer, Grid { |
16 this(in string name) { | |
17 super(name); | |
18 } | |
19 | |
14 override Rectangle bounds() const { | 20 override Rectangle bounds() const { |
15 // We don't require any geometry | 21 // We don't require any geometry |
16 return Rectangle(); | 22 return Rectangle(); |
17 } | 23 } |
18 | 24 |
19 override void draw(const Viewport viewport, in Rectangle damage, | 25 override void draw(const Viewport viewport, |
20 Context model_cr, Context screen_cr) const { | 26 in Rectangle pixel_damage, scope Context pixel_cr, |
27 in Rectangle model_damage, scope Context model_cr) const { | |
21 double zoom = viewport.zoom; | 28 double zoom = viewport.zoom; |
22 | 29 |
23 double start_x = modf(damage.min_corner.x, zoom); | 30 //double start_x = modf(damage.min_corner.x, zoom); |
24 } | 31 } |
25 | 32 |
26 private { | 33 private { |
27 } | 34 } |
28 } | 35 } |