 (def default-primitive-params
   {:filled false :color Color/BLACK})
 
-(defn set-style [g2d params]
+(defn set-style [g2d {:keys [alpha color]}]
   (doto g2d
-    (.setColor (:color params))))
+    (.setComposite (if (or (not alpha) 
+                           (= alpha 1))
+                     AlphaComposite/Src
+                     (AlphaComposite/getInstance AlphaComposite/SRC_ATOP alpha)))
+    (.setColor (if color color Color/BLACK))))
 
 (defn- -? [a b]
   (when (and a b)

  [
   {:type :primitive-round-rect
    :params {:l 20 :t 10 :w 140 :h 140
             :arc-width 20 :arc-height 20
             :filled true :color Color/RED}}
   {:type :primitive-ellipse
    :params {:l 25 :t 15 :w 110 :h 90
             :arc-width 20 :arc-height 20
             :filled true :color Color/YELLOW}}
   {:type :primitive-round-rect
    :params {:x 90 :y 80 :r 160 :b 150

             :filled false
             :closed true}}
   {:type :primitive-text
    :params {:x 180 :y 120 :text "TEST"
             :color Color/BLUE
             :alpha 0.5
             :font {:name "Courier New"
                    :bold true
                    :italic false
