Method: MagicCloud::Rect#move_to
- Defined in:
- lib/magic_cloud/rect.rb
#move_to(x, y) ⇒ Object
shift to new coords, preserving the size
34 35 36 37 38 39 |
# File 'lib/magic_cloud/rect.rb', line 34 def move_to(x, y) @x1 += x - @x0 @y1 += y - @y0 @x0 = x @y0 = y end |