Sha256: 8054c30ad4fc0ee99245b6f659c138ae50b9391f7f6133063e5bfaf6f12d56d4
Contents?: true
Size: 464 Bytes
Versions: 6
Compression:
Stored size: 464 Bytes
Contents
# frozen_string_literal: true module Gruff class Renderer::Polygon def initialize(args = {}) @color = args[:color] @width = args[:width] || 1.0 @opacity = args[:opacity] || 1.0 end def render(points) draw = Renderer.instance.draw draw.push draw.stroke_width(@width) draw.stroke(@color) draw.fill(@color) draw.fill_opacity(@opacity) draw.polygon(*points) draw.pop end end end
Version data entries
6 entries across 6 versions & 1 rubygems