Sha256: d0a0a95f7e07377eb5e570382576636d29bf43326806a08046aca0efab019581

Contents?: true

Size: 393 Bytes

Versions: 6

Compression:

Stored size: 393 Bytes

Contents

# frozen_string_literal: true

module Gruff
  class Renderer::Polyline
    def initialize(args = {})
      @color = args[:color]
      @width = args[:width]
    end

    def render(points)
      draw = Renderer.instance.draw

      draw.push
      draw.stroke(@color)
      draw.fill('transparent')
      draw.stroke_width(@width)
      draw.polyline(*points)
      draw.pop
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gruff-0.11.0 lib/gruff/renderer/polyline.rb
gruff-0.11.0-java lib/gruff/renderer/polyline.rb
gruff-0.10.0 lib/gruff/renderer/polyline.rb
gruff-0.10.0-java lib/gruff/renderer/polyline.rb
gruff-0.9.0 lib/gruff/renderer/polyline.rb
gruff-0.9.0-java lib/gruff/renderer/polyline.rb