Mercurial > projects > doodle
comparison doodle/dia/layer_stack.d @ 132:bc5baa585b32
Updated to dmd 2.060
author | David Bryant <bagnose@gmail.com> |
---|---|
date | Thu, 02 Aug 2012 15:32:43 +0930 |
parents | 10ad5417bf07 |
children | 752676232e4b |
comparison
equal
deleted
inserted
replaced
130:1bc3475624d3 | 132:bc5baa585b32 |
---|---|
7 final class LayerStack { | 7 final class LayerStack { |
8 this(Layer[] layers) { | 8 this(Layer[] layers) { |
9 _layers = layers.dup; | 9 _layers = layers.dup; |
10 } | 10 } |
11 | 11 |
12 Rectangle bounds() const { | 12 @property Rectangle bounds() const { |
13 // Take the union of all layer bounds | 13 // Take the union of all layer bounds |
14 Rectangle bounds; | 14 Rectangle bounds; |
15 foreach (layer; _layers) { bounds = bounds | layer.bounds; } | 15 foreach (layer; _layers) { bounds = bounds | layer.bounds; } |
16 return bounds; | 16 return bounds; |
17 } | 17 } |