Sha256: 097f0c0e36ef00bd5424335a1893429fe7716b5e0a96bdbc6421cbef381771b3

Contents?: true

Size: 929 Bytes

Versions: 4

Compression:

Stored size: 929 Bytes

Contents

class Shoes
  module Swt
    class RectPainter < Common::Painter
      def fill(graphics_context)
        graphics_context.fill_round_rectangle(@obj.element_left,
                                              @obj.element_top,
                                              @obj.element_width,
                                              @obj.element_height,
                                              @obj.corners * 2,
                                              @obj.corners * 2)
      end

      def draw(gc)
        stroke_width = gc.get_line_width
        gc.draw_round_rectangle(@obj.element_left + stroke_width / 2,
                                @obj.element_top + stroke_width / 2,
                                @obj.element_width - stroke_width,
                                @obj.element_height - stroke_width,
                                @obj.corners * 2, @obj.corners * 2)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
shoes-swt-4.0.0.pre6 lib/shoes/swt/rect_painter.rb
shoes-swt-4.0.0.pre5 lib/shoes/swt/rect_painter.rb
shoes-swt-4.0.0.pre4 lib/shoes/swt/rect_painter.rb
shoes-swt-4.0.0.pre3 lib/shoes/swt/rect_painter.rb