Sha256: 8e7d5532c8ac0c2c8173c363c9b4a4320310d8d594966b687c935f43b8fa540f
Contents?: true
Size: 535 Bytes
Versions: 12
Compression:
Stored size: 535 Bytes
Contents
# frozen_string_literal: true module Gruff # @private class Renderer::Polygon def initialize(renderer, color:, width: 1.0, opacity: 1.0) @renderer = renderer @color = color @width = width @opacity = opacity end def render(points) @renderer.draw.push @renderer.draw.stroke_width(@width) @renderer.draw.stroke(@color) @renderer.draw.fill_opacity(@opacity) @renderer.draw.fill(@color) @renderer.draw.polygon(*points) @renderer.draw.pop end end end
Version data entries
12 entries across 12 versions & 1 rubygems