[Rubycocoa-devel 1150] Re: utility methods for NSRect, NSPoint, NSRange

Back to archive index

Laurent Sansonetti lsans****@apple*****
Sat Aug 18 00:15:37 JST 2007


That's awesome, thanks!
Laurent

On Aug 17, 2007, at 10:55 AM, Satoshi Nakagawa wrote:

> 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
>
> _______________________________________________
> Rubycocoa-devel mailing list
> Rubyc****@lists*****
> http://lists.sourceforge.jp/mailman/listinfo/rubycocoa-devel




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