Class: Shoes::Star
- Defined in:
- lib/shoes/basic.rb,
lib/shoes/style.rb
Instance Attribute Summary
Attributes inherited from Basic
#args, #dps, #initials, #ln, #parent, #pl
Attributes included from Mod
#margin_bottom, #margin_left, #margin_right, #margin_top
Instance Method Summary collapse
Methods inherited from Basic
#clear, #fix_size, #hide, #hided, #initialize, #move, #move2, #positioning, #set_args, #show, #toggle
Methods included from Mod
Constructor Details
This class inherits a constructor from Shoes::Basic
Instance Method Details
#move3(x, y) ⇒ Object
161 162 163 164 165 166 167 168 169 |
# File 'lib/shoes/basic.rb', line 161 def move3 x, y unless @app.cs.isDisposed w, h = @width + @strokewidth + 1, @height + @strokewidth + 1 hw, hh = w / 2, h / 2 @app.cs.redraw @left - hw, @top - hh, w, h, false @app.cs.redraw x-hw, y - hh, w, h, false end @left, @top = x, y end |
#style(args) ⇒ Object
24 25 26 27 28 |
# File 'lib/shoes/style.rb', line 24 def style args set_args args w, h = @width+@strokewidth+1, @height+@strokewidth+1 @app.cs.redraw @left-w/2 , @top-h/2, w, h, false unless @app.cs.isDisposed end |