Module: Glimmer::SWT::Custom::Drawable
- Included in:
- DisplayProxy, ImageProxy, WidgetProxy
- Defined in:
- lib/glimmer/swt/custom/drawable.rb
Overview
Represents SWT drawable controls (widgets like canvas) and display
Instance Method Summary collapse
Instance Method Details
#clear_shapes ⇒ Object
31 32 33 34 35 36 |
# File 'lib/glimmer/swt/custom/drawable.rb', line 31 def clear_shapes shapes.dup.each do |shape| shape.paint_listener_proxy&.unregister shapes.delete(shape) end end |
#resetup_shape_painting ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/glimmer/swt/custom/drawable.rb', line 38 def resetup_shape_painting # TODO consider performance optimization relating to order of shape rendering (affecting only further shapes not previous ones) reset_gc if respond_to?(:reset_gc) shapes.each do |shape| shape.paint_listener_proxy&.unregister shape.setup_painting end end |
#shapes ⇒ Object
27 28 29 |
# File 'lib/glimmer/swt/custom/drawable.rb', line 27 def shapes @shapes ||= [] end |