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_translateObject



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_leftObject



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_topObject



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