Class: Cocoa::CGRect
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Cocoa::CGRect
- Defined in:
- lib/cocoa/structs/NSRect.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ CGRect
constructor
A new instance of CGRect.
Constructor Details
#initialize(*args) ⇒ CGRect
Returns a new instance of CGRect.
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/cocoa/structs/NSRect.rb', line 3 def initialize *args = args.first if .is_a? Hash self[:origin][:x] = [:x] self[:origin][:y] = [:y] self[:size][:width] = [:width] self[:size][:height] = [:height] else super *args end end |