Sha256: e351e790d71c119337c226cef3e64ed04405c25be39f50b2ed5d202f5f5109c1

Contents?: true

Size: 455 Bytes

Versions: 12

Compression:

Stored size: 455 Bytes

Contents

# frozen_string_literal: true

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

    def render(points)
      @renderer.draw.push
      @renderer.draw.stroke_width(@width)
      @renderer.draw.stroke(@color)
      @renderer.draw.fill_opacity(0.0)
      @renderer.draw.bezier(*points)
      @renderer.draw.pop
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gruff-0.24.0-java lib/gruff/renderer/bezier.rb
gruff-0.24.0 lib/gruff/renderer/bezier.rb
gruff-0.23.0 lib/gruff/renderer/bezier.rb
gruff-0.23.0-java lib/gruff/renderer/bezier.rb
gruff-0.22.0 lib/gruff/renderer/bezier.rb
gruff-0.22.0-java lib/gruff/renderer/bezier.rb
gruff-0.21.0-java lib/gruff/renderer/bezier.rb
gruff-0.21.0 lib/gruff/renderer/bezier.rb
gruff-0.20.0-java lib/gruff/renderer/bezier.rb
gruff-0.20.0 lib/gruff/renderer/bezier.rb
gruff-0.19.0 lib/gruff/renderer/bezier.rb
gruff-0.19.0-java lib/gruff/renderer/bezier.rb