Mercurial > projects > doodle
comparison doodle/dia/grid_layer.d @ 38:452915ecd1f4
Basic logging functionality
author | David Bryant <bagnose@gmail.com> |
---|---|
date | Sun, 27 Sep 2009 22:51:03 +0930 |
parents | 188397ef9a12 |
children | f2e4e1d29b98 |
comparison
equal
deleted
inserted
replaced
37:bc0035393a81 | 38:452915ecd1f4 |
---|---|
49 double x = start(model_damage.min_corner.x, mSpacing); | 49 double x = start(model_damage.min_corner.x, mSpacing); |
50 double y0 = model_damage.min_corner.y; | 50 double y0 = model_damage.min_corner.y; |
51 double y1 = model_damage.max_corner.y; | 51 double y1 = model_damage.max_corner.y; |
52 | 52 |
53 for (;;) { | 53 for (;;) { |
54 line(model_cr, x, y0, x, y1); | 54 vline(model_cr, x, y0, y1); |
55 | 55 |
56 // Ensure 1 pixel wide FIXME is this naughty? We are sneaking | 56 // Ensure 1 pixel wide FIXME is this naughty? We are sneaking |
57 // through cairo to mix model and pixel coordinates... | 57 // through cairo to mix model and pixel coordinates... |
58 model_cr.save(); { | 58 model_cr.save(); { |
59 model_cr.scale(1.0 / xx, 1.0 / yy); | 59 model_cr.scale(1.0 / xx, 1.0 / yy); |
73 double y = start(model_damage.min_corner.y, mSpacing); | 73 double y = start(model_damage.min_corner.y, mSpacing); |
74 double x0 = model_damage.min_corner.x; | 74 double x0 = model_damage.min_corner.x; |
75 double x1 = model_damage.max_corner.x; | 75 double x1 = model_damage.max_corner.x; |
76 | 76 |
77 for (;;) { | 77 for (;;) { |
78 line(model_cr, x0, y, x1, y); | 78 hline(model_cr, y, x0, x1); |
79 | 79 |
80 model_cr.save(); { | 80 model_cr.save(); { |
81 model_cr.scale(1.0 / xx, 1.0 / yy); | 81 model_cr.scale(1.0 / xx, 1.0 / yy); |
82 model_cr.stroke(); | 82 model_cr.stroke(); |
83 } model_cr.restore(); | 83 } model_cr.restore(); |