Class: Shoes::Swt::Arc
- Inherits:
-
Object
- Object
- Shoes::Swt::Arc
- Includes:
- Common::PainterUpdatesPosition, Common::Clickable, Common::Fill, Common::Remove, Common::Stroke, Common::Translate, Common::Visibility
- Defined in:
- shoes-swt/lib/shoes/swt/arc.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#dsl ⇒ Object
readonly
Returns the value of attribute dsl.
-
#transform ⇒ Object
readonly
Returns the value of attribute transform.
Attributes included from Common::Clickable
Instance Method Summary collapse
- #angle1 ⇒ Object
- #angle2 ⇒ Object
-
#initialize(dsl, app) ⇒ Arc
constructor
Creates a new Shoes::Swt::Arc.
- #wedge? ⇒ Boolean
Methods included from Common::Translate
#clear_translate, #translate_left, #translate_top
Methods included from Common::Remove
Methods included from Common::Visibility
#hidden?, #hidden_from_view?, #hide, #outside_parent_view?, #show, #toggle, #visible?
Methods included from Common::Stroke
Methods included from Common::Fill
Methods included from Common::Clickable
#click, #pass_coordinates?, #register_click, #release
Constructor Details
#initialize(dsl, app) ⇒ Arc
Creates a new Shoes::Swt::Arc
21 22 23 24 25 26 27 |
# File 'shoes-swt/lib/shoes/swt/arc.rb', line 21 def initialize(dsl, app) @dsl = dsl @app = app @painter = ArcPainter.new(self) @app.add_paint_listener @painter end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
15 16 17 |
# File 'shoes-swt/lib/shoes/swt/arc.rb', line 15 def app @app end |
#dsl ⇒ Object (readonly)
Returns the value of attribute dsl.
15 16 17 |
# File 'shoes-swt/lib/shoes/swt/arc.rb', line 15 def dsl @dsl end |
#transform ⇒ Object (readonly)
Returns the value of attribute transform.
15 16 17 |
# File 'shoes-swt/lib/shoes/swt/arc.rb', line 15 def transform @transform end |
Instance Method Details
#angle1 ⇒ Object
29 30 31 |
# File 'shoes-swt/lib/shoes/swt/arc.rb', line 29 def angle1 radians_to_degrees dsl.angle1 end |
#angle2 ⇒ Object
33 34 35 |
# File 'shoes-swt/lib/shoes/swt/arc.rb', line 33 def angle2 radians_to_degrees dsl.angle2 end |
#wedge? ⇒ Boolean
37 38 39 |
# File 'shoes-swt/lib/shoes/swt/arc.rb', line 37 def wedge? dsl.wedge? end |