Mercurial > projects > doodle
comparison doodle/dia/grid_layer.d @ 80:b759414d2b72
Switched from cairo to Drawable abstraction
author | "David Bryant <bagnose@gmail.com>" |
---|---|
date | Sun, 15 Aug 2010 23:43:04 +0930 |
parents | c03ed75c0f8e |
children | d92b9f04b1e8 |
comparison
equal
deleted
inserted
replaced
79:535bae7a7305 | 80:b759414d2b72 |
---|---|
30 override Rectangle bounds() const { | 30 override Rectangle bounds() const { |
31 // We don't require any geometry | 31 // We don't require any geometry |
32 return Rectangle(); | 32 return Rectangle(); |
33 } | 33 } |
34 | 34 |
35 override void draw(in Rectangle pixelDamage, scope Context pixelCr, | 35 override void draw(in Rectangle screenDamage, scope Drawable screenDrawable, |
36 in Rectangle modelDamage, scope Context modelCr) const { | 36 in Rectangle modelDamage, scope Drawable modelDrawable) const { |
37 /+ | |
37 assert(_zoomValid); | 38 assert(_zoomValid); |
38 | 39 |
39 double xx = 1.0, yy = 1.0; | 40 double xx = 1.0, yy = 1.0; |
40 modelCr.userToDeviceDistance(xx, yy); | 41 modelCr.userToDeviceDistance(xx, yy); |
41 | 42 |
84 | 85 |
85 y += _spacing; | 86 y += _spacing; |
86 } | 87 } |
87 } | 88 } |
88 } modelCr.restore(); | 89 } modelCr.restore(); |
90 +/ | |
89 } | 91 } |
90 | 92 |
91 // IGrid overrides: | 93 // IGrid overrides: |
92 | 94 |
93 override void zoomChanged(double zoom) { | 95 override void zoomChanged(double zoom) { |