changeset 117:a50a304e58d8

Empty layer.
author Mikhail Kryshen <mikhail@kryshen.net>
date Fri, 02 Mar 2012 05:21:45 +0400
parents b76c0d00898b
children b6b83ca37318
files src/net/kryshen/indyvon/layers.clj
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/net/kryshen/indyvon/layers.clj	Tue Feb 28 02:31:10 2012 +0400
+++ b/src/net/kryshen/indyvon/layers.clj	Fri Mar 02 05:21:45 2012 +0400
@@ -53,6 +53,14 @@
        (render! ~@render-tail)
        (geometry [t#] (geometry layer#)))))
 
+(defrecord Empty []
+  Layer
+  (render! [_])
+  (geometry [_]
+    (->Size 0 0)))
+
+(def empty-layer (->EmptyLayer))
+
 (defn padding
   "Decorates layer adding padding."
   ([content pad]