       A higher margin will leave less space for cells.
     :viewbox - Optional. A map with :x, :y, :width, and :height keys. Used to
       generate the SVG viewbox attribute string.
+    :rect-attributes - Optional. A map of SVG attributes to be applied to all rects.
+    :line-attributes - Optional. A map of SVG attributes to be applied to all lines.
 
   Values returned:
     :grid - The grid which is being rendered; rendering functions may use this
       for additional information. For instance, drawing connections between
       rooms is simplified when grid/find-cell is available.
+
     :width - Passed through from input options.
     :height - Passed through from input options.
     :viewbox - Passed through from input options.
     :margin - Passed through from input options.
+    :rect-attributes - Passed through from input options.
+    :line-attributes - Passed through from input options.
+
     :cell-width - The width of each cell to be rendered.
     :cell-height - The height of each cell to be rendered.
     :cell-h-spacing - The horizontal space between each cell.


(def default-rect-attributes
  (merge default-stroke-attributes
         {:fill-opacity 0}))

(defn rect [attributes]
  [:rect (merge attributes default-rect-attributes)])

(defn line [attributes]
  [:line (merge attributes default-stroke-attributes)])

(defn svg
  "Given a render environment generated by render-environment, returns an SVG

        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?)
