Class: Cocoa::CGPoint

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/cocoa/structs/NSPoint.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ CGPoint

Returns a new instance of CGPoint.



3
4
5
6
7
8
9
10
11
# File 'lib/cocoa/structs/NSPoint.rb', line 3

def initialize *args
  options = args.first
  if options.is_a? Hash
    self[:x] = options[:x]
    self[:y] = options[:y]
  else
    super *args
  end
end