Class: Rect
Instance Method Summary collapse
- #height ⇒ Object
-
#initialize(rect = nil, left = 0, top = 0, right = 0, bottom = 0) ⇒ Rect
constructor
A new instance of Rect.
- #native ⇒ Object
- #set(left, top, right, bottom) ⇒ Object
- #width ⇒ Object
Constructor Details
#initialize(rect = nil, left = 0, top = 0, right = 0, bottom = 0) ⇒ Rect
Returns a new instance of Rect.
3 4 5 6 7 8 9 10 |
# File 'lib/droiuby/wrappers/canvas_wrapper.rb', line 3 def initialize(rect = nil, left = 0, top = 0, right = 0, bottom = 0) if (rect.nil?) @native = Java::android.graphics.Rect.new(left, top, right, bottom) else @native = rect end end |
Instance Method Details
#height ⇒ Object
16 17 18 |
# File 'lib/droiuby/wrappers/canvas_wrapper.rb', line 16 def height @native.height end |
#native ⇒ Object
12 13 14 |
# File 'lib/droiuby/wrappers/canvas_wrapper.rb', line 12 def native @native end |
#set(left, top, right, bottom) ⇒ Object
24 25 26 |
# File 'lib/droiuby/wrappers/canvas_wrapper.rb', line 24 def set(left, top, right, bottom) @native.set(left, top, right, bottom) end |
#width ⇒ Object
20 21 22 |
# File 'lib/droiuby/wrappers/canvas_wrapper.rb', line 20 def width @native.width end |