Sha256: 6662e4a8a45a1c9e6c0c8cd5805488a47b14432d1b26869372ab466a37c5937e

Contents?: true

Size: 397 Bytes

Versions: 8

Compression:

Stored size: 397 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
        draw_grid do |row, column|
          pdf.fill_circle [column*spacing, row*spacing], dot_weight
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dot_grid-0.0.12 lib/dot_grid/pattern/dot_grid.rb
dot_grid-0.0.11 lib/dot_grid/pattern/dot_grid.rb
dot_grid-0.0.10 lib/dot_grid/pattern/dot_grid.rb
dot_grid-0.0.9 lib/dot_grid/pattern/dot_grid.rb
dot_grid-0.0.8 lib/dot_grid/pattern/dot_grid.rb
dot_grid-0.0.7 lib/dot_grid/pattern/dot_grid.rb
dot_grid-0.0.6 lib/dot_grid/pattern/dot_grid.rb
dot_grid-0.0.5 lib/dot_grid/pattern/dot_grid.rb