 
 (def default-rect-attributes
   (merge default-stroke-attributes
-         {:fill-opacity 0}))
+         {:fill-opacity 1.0}))
+
+; In principle, may differ from stroke attributes.
+(def default-line-attributes default-stroke-attributes)
+
+(def default-render-environment-options
+  {:width (:width default-svg-attributes)
+   :height (:height default-svg-attributes)
+   :margin 20
+   :size-spacing-ratio 0.5
+   :rect-attributes default-rect-attributes
+   :line-attributes default-line-attributes})
 
 (defn rect [attributes]
-  [:rect (merge attributes default-rect-attributes)])
+  [:rect (merge default-rect-attributes attributes)])
 
 (defn line [attributes]
-  [:line (merge attributes default-stroke-attributes)])
+  [:line (merge default-stroke-attributes attributes)])
 
 (defn svg
   "Given a render environment generated by render-environment, returns an SVG

  :ret (spec/coll-of number? :min-count 2 :max-count 2))

(defn render-rect [render-env cell]
  (rect (room-geometry render-env cell)))

(defn render-line [render-env cell direction]
  (let [start-room (room-geometry render-env cell)

        end-room (room-geometry render-env end-cell)
        [x1 y1] (anchor-point start-room direction)
        [x2 y2] (anchor-point end-room (direction grid/converse-directions))]
    (line (merge (:line-attributes render-env)
                 {:x1 x1, :y1 y1, :x2 x2, :y2 y2}))))
(spec/fdef render-line
  :args (spec/cat :render-env map? :cell ::grid/cell :direction ::grid/direction)
  :ret vector?)
