Module: SugarCube::CGPointExtensions::ClassMethods

Defined in:
lib/sugarcube/core_graphics.rb

Instance Method Summary collapse

Instance Method Details

#from_hash(hash) ⇒ Object



136
137
138
139
140
141
142
143
# File 'lib/sugarcube/core_graphics.rb', line 136

def from_hash(hash)
  ret = Pointer.new(CGPoint.type)
  if CGPointMakeWithDictionaryRepresentation(hash, ret)
    ret[0]
  else
    nil
  end
end