Sha256: ea082db44b93e61c340133b073c19db0fbcec8d8ebb297af29aba473c5ec9e13

Contents?: true

Size: 380 Bytes

Versions: 1

Compression:

Stored size: 380 Bytes

Contents

module DotGrid
  module Pattern
    class Grid < Pattern
      def draw
        pdf.stroke_color grid_color
        (0..rows).each do |row|
          pdf.stroke_horizontal_line(0, bounds.width, :at => row*spacing)
        end
        (0..columns).each do |column|
          pdf.stroke_vertical_line(0, bounds.height, :at => column*spacing)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dot_grid-0.0.4 lib/dot_grid/pattern/grid.rb