Sha256: 20cbbaf8ab48a19ffe42e3daa64fc23d0e9cb40a096691891bd9298c0f141c01

Contents?: true

Size: 444 Bytes

Versions: 1

Compression:

Stored size: 444 Bytes

Contents

module DotGrid
  module Pattern
    class DotGrid < Pattern
      attr_accessor(
        :dot_weight,
      )

      def post_initialize(params)
        @dot_weight = params[:dot_weight] || 1.5
      end

      def draw
        pdf.fill_color grid_color
        (0..rows).each do |row|
          (0..columns).each do |col|
            pdf.fill_circle [col*spacing, row*spacing], dot_weight
          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/dot_grid.rb