Class: Conquer::Dzen::Graphics::Graphic
- Inherits:
-
Object
- Object
- Conquer::Dzen::Graphics::Graphic
show all
- Includes:
- Positioning
- Defined in:
- lib/conquer/dzen/graphics/graphic.rb
Instance Method Summary
collapse
#ignore_bg, #lock_x, #shift, #unlock_x
Constructor Details
9
10
11
12
|
# File 'lib/conquer/dzen/graphics/graphic.rb', line 9
def initialize
@x_shift = 0
@y_shift = 0
end
|
Instance Method Details
#move(x, y) ⇒ Object
14
15
16
17
18
|
# File 'lib/conquer/dzen/graphics/graphic.rb', line 14
def move(x, y)
@x_shift += x
@y_shift += y
self
end
|
#to_s ⇒ Object
20
21
22
|
# File 'lib/conquer/dzen/graphics/graphic.rb', line 20
def to_s
shift(@x_shift, @y_shift) { render }
end
|