Sha256: 3cb252a1231d1d91f768481a130a6c1c8284ae0b7c68fce50a436e9dd3d6be8d

Contents?: true

Size: 457 Bytes

Versions: 10

Compression:

Stored size: 457 Bytes

Contents

# frozen_string_literal: true

module Gruff
  # @private
  class Renderer::Polyline
    def initialize(renderer, color:, width:)
      @renderer = renderer
      @color = color
      @width = width
    end

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gruff-0.18.0-java lib/gruff/renderer/polyline.rb
gruff-0.18.0 lib/gruff/renderer/polyline.rb
gruff-0.17.0-java lib/gruff/renderer/polyline.rb
gruff-0.17.0 lib/gruff/renderer/polyline.rb
gruff-0.16.0 lib/gruff/renderer/polyline.rb
gruff-0.16.0-java lib/gruff/renderer/polyline.rb
gruff-0.15.0-java lib/gruff/renderer/polyline.rb
gruff-0.15.0 lib/gruff/renderer/polyline.rb
gruff-0.14.0 lib/gruff/renderer/polyline.rb
gruff-0.14.0-java lib/gruff/renderer/polyline.rb