Sha256: 9b3f3a8d9319aa02e02950ee96886e17ba3f6a00e13d6a4e1ae87e86f2d4d906
Contents?: true
Size: 424 Bytes
Versions: 1
Compression:
Stored size: 424 Bytes
Contents
module DotGrid module Pattern class Checkerboard < Pattern def draw pdf.fill_color grid_color (0..rows).each do |row| (0..columns).each do |column| if (row % 2 == 0 && column % 2 == 0) || (row % 2 == 1 && column % 2 == 1) pdf.fill_rectangle [column*spacing, row*spacing], spacing, spacing end end 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/checkerboard.rb |