Sha256: 9d3b55945cd8f66627ceeb3f84440cce60d768662b02109895fd50fe9f3dfe9f
Contents?: true
Size: 477 Bytes
Versions: 2
Compression:
Stored size: 477 Bytes
Contents
module DotGrid class Grid < Page attr_accessor( :dot_weight, :grid_color, :spacing, ) def initialize(params) super end def page_rows (page_height / spacing).floor end def page_columns (page_width / spacing).floor end def generate pdf.start_new_page num_columns = page_columns num_rows = page_rows draw_dot_grid(num_rows, num_columns, 0, pdf.bounds.height) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dot_grid-0.0.3 | lib/dot_grid/grid.rb |
dot_grid-0.0.1 | lib/dot_grid/grid.rb |