[Rubycocoa-devel 1149] utility methods for NSRect, NSPoint, NSRange

Back to archive index

Satoshi Nakagawa snaka****@infot*****
Fri Aug 17 17:55:37 JST 2007


Hi.

I have added some utility methods to NSRect, NSPoint, NSRange in r2002.
Because I want to write 'rect.intersect?(frame)' than 'NSIntersectRect(rect, frame)'.


New methods:

NSRect
  - center
  - contain?(rect or point)
  - empty?
  - inflate(dx, dy)
  - inset(dx, dy)
  - integral
  - intersect?(rect)
  - intersection(rect)
  - offset(dx, dy)
  - union(rect)

NSPoint
  - in?(rect) / inRect?(rect)

NSRange
  - contain?(range or location)
  - empty?
  - intersect?(range)
  - intersection(range)
  - union(range)

--
Satoshi Nakagawa




More information about the Rubycocoa-devel mailing list
Back to archive index