Mercurial > projects > doodle
diff doodle/dia/icanvas.d @ 67:31d10176415d
Checkpoint
author | daveb |
---|---|
date | Fri, 13 Aug 2010 15:28:04 +0930 |
parents | 43cc2135ced0 |
children | c03ed75c0f8e |
line wrap: on
line diff
--- a/doodle/dia/icanvas.d Thu Aug 12 22:43:42 2010 +0930 +++ b/doodle/dia/icanvas.d Fri Aug 13 15:28:04 2010 +0930 @@ -21,19 +21,12 @@ // FIXME get rid of these and accumulate damage during event handling void damageModel(in Rectangle area); // FIXME could be an inout parameter of the event handling, or a special scope Damage object that supports growth only void damagePixel(in Rectangle area); // FIXME as above +} - /* - // FIXME hoping we won't need anything like this - double zoom() const; - Point modelToPixel(in Point model) const; - Point pixelToModel(in Point pixel) const; - Vector modelToPixel(in Vector model) const; - Vector pixelToModel(in Vector pixel) const; - Rectangle modelToPixel(in Rectangle model) const; - Rectangle pixelToModel(in Rectangle model) const; - double modelToPixel(in double model) const; - double pixelToModel(in double pixel) const; - */ +final class Damage { + void increase(in Rectangle additional) { _rectangle = _rectangle | additional; } + Rectangle rectangle() const { return _rectangle; } + private Rectangle _rectangle; } interface IEventHandler {