Class: DotGrid::Pattern::Grid

Inherits:
DotGrid::Pattern show all
Defined in:
lib/dot_grid/pattern/grid.rb

Instance Method Summary collapse

Instance Method Details

#drawObject



4
5
6
7
8
9
10
# File 'lib/dot_grid/pattern/grid.rb', line 4

def draw
  pdf.stroke_color grid_color
  draw_grid do |row, column|
    pdf.stroke_horizontal_line(0, bounds.width, :at => row*spacing) if column == 0
    pdf.stroke_vertical_line(0, bounds.height, :at => column*spacing) if row == 0
  end
end