Re: Inviting to comment on Cocoa categories

2008-11-10 Thread James W. Walker
On Nov 10, 2008, at 2:40 AM, Kyle Sluder wrote: If I remember correctly, matrix multiplication does not distribute over matrix addition, and since a transformation matrix stack is essentially a product of sums, the API designers might, as you suggest, have simply left the functionality out for

Re: Inviting to comment on Cocoa categories

2008-11-10 Thread Roland King
possibly drifting towards off topic here but ... An Affine Transform (in the context we're talking about here here) is a transform which maps straight lines to straight lines. If it was straight when you started, it's straight after you're done. It also preserves the relative distance betwe

Re: Inviting to comment on Cocoa categories

2008-11-10 Thread Graham Cox
On 10 Nov 2008, at 10:07 pm, Kyle Sluder wrote: On Mon, Nov 10, 2008 at 5:56 AM, Graham Cox <[EMAIL PROTECTED]> wrote: Yet you need to do this all the time if you do rotation of anything at all. Rotation around the origin is almost never in itself useful. Eh, I beg to differ. Rotation ab

Re: Inviting to comment on Cocoa categories

2008-11-10 Thread Kyle Sluder
On Mon, Nov 10, 2008 at 5:56 AM, Graham Cox <[EMAIL PROTECTED]> wrote: > Yet you need to do this all the time if you do rotation of anything at all. > Rotation around the origin is almost never in itself useful. Eh, I beg to differ. Rotation about the origin is one of the most common operations i

Re: Inviting to comment on Cocoa categories

2008-11-10 Thread Graham Cox
On 10 Nov 2008, at 9:40 pm, Kyle Sluder wrote: Interestingly enough, I can't recall seeing any graphics API that provided rotation around a point. I know DirectX doesn't. Yet you need to do this all the time if you do rotation of anything at all. Rotation around the origin is almost never

Re: Inviting to comment on Cocoa categories

2008-11-10 Thread Kyle Sluder
On Sun, Nov 9, 2008 at 10:58 PM, Michael Ash <[EMAIL PROTECTED]> wrote: > Whoops, you're right. Still, NSAffineTransform can obviously do > translations, so surely this objection does not make sense? It's a gut reaction. Not being a linear algebra guru, I'm wondering if it's done to avoid confusi

Re: Inviting to comment on Cocoa categories

2008-11-09 Thread Kyle Sluder
On Sun, Nov 9, 2008 at 10:43 PM, Michael Ash <[EMAIL PROTECTED]> wrote: > That's not so. Any affine transform is a linear transformation, and > rotation around a point can certainly be represented as an affine > transform. No, you have that backwards. Any linear transformation is an affine transf

Re: Inviting to comment on Cocoa categories

2008-11-09 Thread Graham Cox
On 10 Nov 2008, at 1:55 pm, Kyle Sluder wrote: Please be aware that rotation around a point other than the origin is not a linear transformation. This may be why such functionality was omitted from NSAffineTransform. It is linear. But maybe what you're referring to is that it's easy to sc

Re: Inviting to comment on Cocoa categories

2008-11-09 Thread Michael Ash
On Sun, Nov 9, 2008 at 9:55 PM, Kyle Sluder <[EMAIL PROTECTED]> wrote: > On Sun, Nov 9, 2008 at 1:47 PM, Tommy Nordgren <[EMAIL PROTECTED]> wrote: >> +(NSAffineTransform *) transformRotatedAroundPoint:(NSPoint) p >> degrees:(CGFloat) deg; > > Please be aware that rotation around a point other than

Re: Inviting to comment on Cocoa categories

2008-11-09 Thread Kyle Sluder
On Sun, Nov 9, 2008 at 1:47 PM, Tommy Nordgren <[EMAIL PROTECTED]> wrote: > +(NSAffineTransform *) transformRotatedAroundPoint:(NSPoint) p > degrees:(CGFloat) deg; Please be aware that rotation around a point other than the origin is not a linear transformation. This may be why such functionality

Re: Inviting to comment on Cocoa categories

2008-11-09 Thread Tommy Nordgren
On 10 nov 2008, at 00.07, Graham Cox wrote: On 10 Nov 2008, at 5:47 am, Tommy Nordgren wrote: // TN+NSAffineTransform.h @interface NSAffineTransform (TNGraphics) A comment on naming conventions. It doesn't matter that much especially if you are just using them privately, but there's an

Re: Inviting to comment on Cocoa categories

2008-11-09 Thread Bill Bumgarner
On Nov 9, 2008, at 3:07 PM, Graham Cox wrote: +(NSAffineTransform *) transformRotatedAroundPoint:(NSPoint) p degrees:(CGFloat) deg; A handy method, but I wonder if it could be named to be more readable with respect to its actual function, for example: + transformWithPoint:rotatedByDegrees:

Re: Inviting to comment on Cocoa categories

2008-11-09 Thread Graham Cox
On 10 Nov 2008, at 5:47 am, Tommy Nordgren wrote: // TN+NSAffineTransform.h @interface NSAffineTransform (TNGraphics) A comment on naming conventions. It doesn't matter that much especially if you are just using them privately, but there's an inconsistency here. Usually I name category

Inviting to comment on Cocoa categories

2008-11-09 Thread Tommy Nordgren
TN+NSAffineTransform.h Description: Binary data TN+NSBezierPath.h Description: Binary data TN+NSAffineTransform.m Description: Binary data TN+NSBezierPath.m Description: Binary data I would like comments on the following Categories on NSBezierPath and NSAffineTransform. In particular I