Class: WinFFI::RECT
- Inherits:
-
FFIAdditions::Struct
- Object
- FFIAdditions::Struct
- WinFFI::RECT
- Defined in:
- lib/win-ffi/core/struct/rect.rb
Overview
Instance Method Summary collapse
- #==(other) ⇒ Object
- #height ⇒ Object
- #height=(v) ⇒ Object
- #to_s ⇒ Object
- #width ⇒ Object
- #width=(v) ⇒ Object
Methods inherited from FFIAdditions::Struct
Instance Method Details
#==(other) ⇒ Object
31 32 33 34 |
# File 'lib/win-ffi/core/struct/rect.rb', line 31 def ==(other) return false unless other.is_a?(self.class) left == other.left && top == other.top && right == other.right&& bottom == other.bottom end |
#height ⇒ Object
19 20 21 |
# File 'lib/win-ffi/core/struct/rect.rb', line 19 def height bottom - top end |
#height=(v) ⇒ Object
23 24 25 |
# File 'lib/win-ffi/core/struct/rect.rb', line 23 def height=(v) self.bottom = top + v end |
#to_s ⇒ Object
27 28 29 |
# File 'lib/win-ffi/core/struct/rect.rb', line 27 def to_s "(left = #{left}, top = #{top}, width = #{right - left}, height = #{bottom - top})" end |
#width ⇒ Object
11 12 13 |
# File 'lib/win-ffi/core/struct/rect.rb', line 11 def width right - left end |
#width=(v) ⇒ Object
15 16 17 |
# File 'lib/win-ffi/core/struct/rect.rb', line 15 def width=(v) self.right = left + v end |