Mercurial > projects > doodle
diff doodle/tk/geometry.d @ 136:752676232e4b
Port to GtkD-2.0 (gtk+3)
author | David Bryant <bagnose@gmail.com> |
---|---|
date | Wed, 26 Sep 2012 17:36:31 +0930 |
parents | bc5baa585b32 |
children |
line wrap: on
line diff
--- a/doodle/tk/geometry.d Mon Sep 17 11:49:45 2012 +0930 +++ b/doodle/tk/geometry.d Wed Sep 26 17:36:31 2012 +0930 @@ -196,6 +196,15 @@ } } + bool contains(in Rectangle r) const { + if (r.valid) { + return x0 <= r.x0 && y0 <= r.y0 && x1 >= r.x1 && y1 >= r.y1; + } + else { + return valid; + } + } + // // FIXME this method is all about pixels. Not sure it belongs in