Module: Shoes::Common::Translate
- Included in:
- ArtElement, Image, Swt::Arc, Swt::Arrow, Swt::Background, Swt::Border, Swt::Line, Swt::Oval, Swt::Rect, Swt::Star, Swt::TextBlock, TextBlock
- Defined in:
- shoes-core/lib/shoes/common/translate.rb
Instance Method Summary collapse
Instance Method Details
#clear_translate ⇒ Object
20 21 22 23 |
# File 'shoes-core/lib/shoes/common/translate.rb', line 20 def clear_translate @translate_left = nil @translate_top = nil end |
#translate_left ⇒ Object
6 7 8 9 10 11 |
# File 'shoes-core/lib/shoes/common/translate.rb', line 6 def translate_left @translate_left ||= begin left, _ = translate left || 0 end end |
#translate_top ⇒ Object
13 14 15 16 17 18 |
# File 'shoes-core/lib/shoes/common/translate.rb', line 13 def translate_top @translate_top ||= begin _, top = translate top || 0 end end |