changeset 130:43f78efe0903

Draw borders above content. Use fractional coordinates for correct alignment between panel and border.
author Mikhail Kryshen <mikhail@kryshen.net>
date Fri, 13 Apr 2012 20:24:19 +0400
parents 137e64553123
children 24d4c9f3be90
files src/net/kryshen/indyvon/layers.clj
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/net/kryshen/indyvon/layers.clj	Fri Apr 13 04:25:18 2012 +0400
+++ b/src/net/kryshen/indyvon/layers.clj	Fri Apr 13 20:24:19 2012 +0400
@@ -90,6 +90,7 @@
      (let [layer (padding content (+ thikness gap))
            t (double thikness)]
        (decorate-layer layer [_]
+         (render! layer)
          (with-color :border-color
            (let [w (double *width*)
                  h (double *height*)
@@ -98,8 +99,7 @@
              (.fill *graphics*
                     (doto (Path2D$Double. Path2D/WIND_EVEN_ODD)
                       (.append outer false)
-                      (.append inner false)))))
-         (render! layer)))))
+                      (.append inner false)))))))))
 
 ;; TODO: opacity and blur.
 (defn shadow
@@ -133,7 +133,7 @@
      (let [layer (padding content gap)]
        (decorate-layer layer [_]
          (with-color :alt-back-color
-           (.fillRect *graphics* 0 0 *width* *height*))
+           (.fill *graphics* (Rectangle2D$Double. 0.0 0.0 *width* *height*)))
          (render! layer)))))
 
 (defn hbox