On Wed, May 20, 2009 at 8:31 AM, Andreas Grosam <agro...@onlinehome.de> wrote: > I just stumbled over this issue with CGRectUnion when one operand is an > empty rect, or has negative width or hight: > > CGRect r1 = CGRectZero; > CGRect r2 = CGRectMake(100.0, 100.0, 300.0, 300.0); > CGRect r3 = CGRectUnion(r1, r2); > > the result for r3 is actually : > r3.origin: (0, 0) > r3.size: (300, 300)
Try swapping r1 and r2 in CGRectUnion.... CGRectUnion(r2,r1) to see what happens. Anyway I recall seeing this issue at some point but I see code of mine that can have a zero rect that doesn't appear to exhibit a problem (but I need to retest things to be sure). ..but yeah file a defect about it. -Shawn _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com