Class: OSX::NSPoint
Overview
NSPoint additions.
Instance Method Summary (collapse)
- - (Object) +(v)
- - (Object) -(v)
- - (Boolean) in?(rect) (also: #inRect?)
- - (Object) inspect
Instance Method Details
- (Object) +(v)
87 88 89 90 91 92 93 |
# File 'src/ruby/osx/objc/oc_types.rb', line 87 def +(v) if v.is_a?(OSX::NSSize) OSX::NSPoint.new(x + v.width, y + v.height) else raise ArgumentException, "parameter should be NSSize" end end |
- (Object) -(v)
94 95 96 97 98 99 100 |
# File 'src/ruby/osx/objc/oc_types.rb', line 94 def -(v) if v.is_a?(OSX::NSSize) OSX::NSPoint.new(x - v.width, y - v.height) else raise ArgumentException, "parameter should be NSSize" end end |
- (Boolean) in?(rect) Also known as: inRect?
85 |
# File 'src/ruby/osx/objc/oc_types.rb', line 85 def in?(rect); OSX::NSPointInRect(self, rect); end |
- (Object) inspect
101 |
# File 'src/ruby/osx/objc/oc_types.rb', line 101 def inspect; "#<#{self.class} x=#{x}, y=#{y}>"; end |