Sha256: cd2271fc9938c02c0441dabfbdd9478a329dc1a19a1728bd470811fb70ad1c67

Contents?: true

Size: 785 Bytes

Versions: 1

Compression:

Stored size: 785 Bytes

Contents

class Shoes
  class Background
    include DimensionsDelegations
    include CommonMethods
    include Common::BackgroundElement
    include Common::Style
    include Common::Fill
    include Common::Stroke

    attr_reader :app, :gui, :parent, :corners, :angle, :dimensions

    def initialize(app, parent, color, opts = {}, blk = nil)
      @app    = app
      @parent = parent
      @dimensions = ParentDimensions.new parent, opts
      @corners    = opts[:curve] || 0
      @angle      = opts[:angle] || 0
      opts[:fill] = color

      @style = Common::Fill::DEFAULTS.merge(Common::Stroke::DEFAULTS).merge(opts)
      parent.add_child self

      @gui = Shoes.backend_for(self, opts, &blk)
    end

    def needs_to_be_positioned?
      absolutely_positioned?
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoes-4.0.0.pre1 lib/shoes/background.rb