Class: Shoes::Swt::Line

Inherits:
Object
  • Object
show all
Includes:
Common::PainterUpdatesPosition, Common::Clickable, Common::Fill, Common::Remove, Common::Stroke, Common::Translate, Common::Visibility
Defined in:
shoes-swt/lib/shoes/swt/line.rb

Instance Attribute Summary collapse

Attributes included from Common::Clickable

#pass_coordinates

Instance Method Summary collapse

Methods included from Common::Translate

#clear_translate, #translate_left, #translate_top

Methods included from Common::Remove

#remove

Methods included from Common::Visibility

#hidden?, #hidden_from_view?, #hide, #outside_parent_view?, #show, #toggle, #visible?

Methods included from Common::Fill

#update_fill

Methods included from Common::Stroke

#update_stroke

Methods included from Common::Clickable

#click, #pass_coordinates?, #register_click, #release

Constructor Details

#initialize(dsl, app) ⇒ Line

Returns a new instance of Line


18
19
20
21
22
23
24
25
26
# File 'shoes-swt/lib/shoes/swt/line.rb', line 18

def initialize(dsl, app)
  @dsl = dsl
  @app = app

  @painter = LinePainter.new(self)
  @app.add_paint_listener(@painter)

  @transform = nil # Not necessary for this shape
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app


15
16
17
# File 'shoes-swt/lib/shoes/swt/line.rb', line 15

def app
  @app
end

#dslObject (readonly)

Returns the value of attribute dsl


15
16
17
# File 'shoes-swt/lib/shoes/swt/line.rb', line 15

def dsl
  @dsl
end

#transformObject (readonly)

Returns the value of attribute transform


16
17
18
# File 'shoes-swt/lib/shoes/swt/line.rb', line 16

def transform
  @transform
end

Instance Method Details

#angleObject


28
29
30
# File 'shoes-swt/lib/shoes/swt/line.rb', line 28

def angle
  @dsl.angle
end