Sha256: a8bf3950f30ca7dfb77bed3c23ac44fc27ea019041a72fbe7d496ab0f6e53c39

Contents?: true

Size: 457 Bytes

Versions: 2

Compression:

Stored size: 457 Bytes

Contents

# frozen_string_literal: true

require_relative "wv/shape_helper"

class Scarpe
  class Line < Scarpe::Widget
    include ShapeHelper

    display_properties :left, :top, :x2, :y2, :color

    def initialize(left, top, x2, y2)
      validate_coordinates(x2, y2)
      @left = left
      @top = top
      @x2 = x2
      @y2 = y2
      @color = color_for_fill

      # validate_coordinates(x2, y2)

      super()
      create_display_widget
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
scarpe-0.2.1 lib/scarpe/line.rb
scarpe-0.2.0 lib/scarpe/line.rb