Sha256: 5b5cb6a5220509757606de56780fe33f6980541ec299012ccf5efee2d1ffa906
Contents?: true
Size: 998 Bytes
Versions: 2
Compression:
Stored size: 998 Bytes
Contents
class Shoes module Swt class OvalPainter < Common::Painter def clipping clipping = ::Swt::Path.new(Shoes.display) clipping.add_arc(@obj.element_left, @obj.element_top, @obj.element_width, @obj.element_height, 0, 360) clipping end def fill(graphics_context) graphics_context.fill_oval(@obj.translate_left + @obj.element_left, @obj.translate_top + @obj.element_top, @obj.element_width, @obj.element_height) end def draw(graphics_context) sw = graphics_context.get_line_width graphics_context.draw_oval(@obj.translate_left + @obj.element_left + sw / 2, @obj.translate_top + @obj.element_top + sw / 2, @obj.element_width - sw, @obj.element_height - sw) 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/oval_painter.rb |
shoes-swt-4.0.0.pre7 | lib/shoes/swt/oval_painter.rb |