# File lib/barby/outputter/svg_outputter.rb, line 51
    def bars_to_rects(opts={})
      rects = ''
      with_options opts do
        x, y = lmargin, tmargin

        if barcode.two_dimensional?
          boolean_groups.each do |line|
            line.each do |bar, amount|
              bar_width = xdim * amount
              if bar
                rects << %Q|<rect x="#{x}" y="#{y}" width="#{bar_width}px" height="#{ydim}px" />\n|
              end
              x += bar_width
            end
            y += ydim
            x = lmargin
          end

        else
          boolean_groups.each do |bar, amount|
            bar_width = xdim * amount
            if bar
              rects << %Q|<rect x="#{x}" y="#{y}" width="#{bar_width}px" height="#{height}px" />\n|
            end
            x += bar_width
          end

        end
      end # with_options

      rects
    end