Sha256: a5af159497504b351645c8ed089cd4e2f3aac2dc5cd69f44cf8b24c787e5f1ba
Contents?: true
Size: 1 KB
Versions: 4
Compression:
Stored size: 1 KB
Contents
# frozen_string_literal: true 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
4 entries across 4 versions & 1 rubygems