Class: WinFFI::RECT

Inherits:
FFIStruct show all
Defined in:
lib/win-ffi/structs/rect.rb

Instance Method Summary collapse

Methods inherited from FFIStruct

layout

Instance Method Details

#heightObject



16
17
18
# File 'lib/win-ffi/structs/rect.rb', line 16

def height
  bottom - top
end

#height=(v) ⇒ Object



20
21
22
# File 'lib/win-ffi/structs/rect.rb', line 20

def height=(v)
  self.bottom = top + v
end

#to_sObject



24
25
26
# File 'lib/win-ffi/structs/rect.rb', line 24

def to_s
  "(left = #{left}, top = #{top}, width = #{width}, height = #{height})"
end

#widthObject



8
9
10
# File 'lib/win-ffi/structs/rect.rb', line 8

def width
  right - left
end

#width=(v) ⇒ Object



12
13
14
# File 'lib/win-ffi/structs/rect.rb', line 12

def width=(v)
  self.right = left + v
end