Sha256: 9f1c22f1e9cdc21acd7733674ac3b9482032919c04122fe94fe3d7cd1d96fab1

Contents?: true

Size: 552 Bytes

Versions: 22

Compression:

Stored size: 552 Bytes

Contents

# frozen_string_literal: true

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

    def render(origin_x, origin_y, width, height, arc_start, arc_end)
      @renderer.draw.push
      @renderer.draw.stroke_width(@width)
      @renderer.draw.stroke(@color)
      @renderer.draw.fill('transparent')
      @renderer.draw.ellipse(origin_x, origin_y, width, height, arc_start, arc_end)
      @renderer.draw.pop
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
gruff-0.24.0-java lib/gruff/renderer/ellipse.rb
gruff-0.24.0 lib/gruff/renderer/ellipse.rb
gruff-0.23.0 lib/gruff/renderer/ellipse.rb
gruff-0.23.0-java lib/gruff/renderer/ellipse.rb
gruff-0.22.0 lib/gruff/renderer/ellipse.rb
gruff-0.22.0-java lib/gruff/renderer/ellipse.rb
gruff-0.21.0-java lib/gruff/renderer/ellipse.rb
gruff-0.21.0 lib/gruff/renderer/ellipse.rb
gruff-0.20.0-java lib/gruff/renderer/ellipse.rb
gruff-0.20.0 lib/gruff/renderer/ellipse.rb
gruff-0.19.0 lib/gruff/renderer/ellipse.rb
gruff-0.19.0-java lib/gruff/renderer/ellipse.rb
gruff-0.18.0-java lib/gruff/renderer/ellipse.rb
gruff-0.18.0 lib/gruff/renderer/ellipse.rb
gruff-0.17.0-java lib/gruff/renderer/ellipse.rb
gruff-0.17.0 lib/gruff/renderer/ellipse.rb
gruff-0.16.0 lib/gruff/renderer/ellipse.rb
gruff-0.16.0-java lib/gruff/renderer/ellipse.rb
gruff-0.15.0-java lib/gruff/renderer/ellipse.rb
gruff-0.15.0 lib/gruff/renderer/ellipse.rb