Class: NSDictionary

Inherits:
Object
  • Object
show all
Defined in:
lib/motion-ui-geometry/nsdictionary.rb

Instance Method Summary collapse

Instance Method Details

#to_pointObject



3
4
5
6
7
# File 'lib/motion-ui-geometry/nsdictionary.rb', line 3

def to_point
  point = Pointer.new CGPoint.type
  CGPointMakeWithDictionaryRepresentation self, point
  point[0]
end

#to_rectObject



15
16
17
18
19
# File 'lib/motion-ui-geometry/nsdictionary.rb', line 15

def to_rect
  rect = Pointer.new CGRect.type
  CGRectMakeWithDictionaryRepresentation self, rect
  rect[0]
end

#to_sizeObject



9
10
11
12
13
# File 'lib/motion-ui-geometry/nsdictionary.rb', line 9

def to_size
  size = Pointer.new CGSize.type
  CGSizeMakeWithDictionaryRepresentation self, size
  size[0]
end