Sha256: d81ac5c30743ab63acfe6d20ab23af66a31c0549b4be4ee0a981bbab14e3bc5c

Contents?: true

Size: 449 Bytes

Versions: 8

Compression:

Stored size: 449 Bytes

Contents

# frozen_string_literal: true

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

    def render(origin_x, origin_y, perim_x, perim_y)
      draw = Renderer.instance.draw

      draw.push
      draw.fill(@color)
      draw.stroke(@color)
      draw.stroke_width(@width)
      draw.circle(origin_x, origin_y, perim_x, perim_y)
      draw.pop
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gruff-0.13.0 lib/gruff/renderer/circle.rb
gruff-0.13.0-java lib/gruff/renderer/circle.rb
gruff-0.12.2 lib/gruff/renderer/circle.rb
gruff-0.12.2-java lib/gruff/renderer/circle.rb
gruff-0.12.1 lib/gruff/renderer/circle.rb
gruff-0.12.1-java lib/gruff/renderer/circle.rb
gruff-0.12.0 lib/gruff/renderer/circle.rb
gruff-0.12.0-java lib/gruff/renderer/circle.rb