Sha256: 57c6427562ad73d63da6e6365aece0cb7e6f73798a2b5f82b773f76c8a9f5207

Contents?: true

Size: 805 Bytes

Versions: 2

Compression:

Stored size: 805 Bytes

Contents

class Shoes
  module Swt
    class Border
      extend Forwardable
      include Common::Fill
      include Common::Stroke
      include Common::Remove
      include Common::Visibility
      include Common::Translate
      include ::Shoes::BackendDimensionsDelegations

      def_delegators :dsl, :angle

      attr_reader :app, :dsl, :painter, :transform

      def initialize(dsl, app)
        @dsl = dsl
        @app = app
        @container = @app.real

        @painter = Painter.new(self)
        @app.add_paint_listener @painter
      end

      def corners
        dsl.curve
      end

      class Painter < RectPainter
        def fill_setup(_gc)
          # don't draw
        end

        def draw_setup(gc)
          @obj.apply_stroke gc
          true
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
shoes-swt-4.0.0.pre8 lib/shoes/swt/border.rb
shoes-swt-4.0.0.pre7 lib/shoes/swt/border.rb