Re: how to clip inside a path

2012-10-30 Thread Vincent Habchi
On 30 oct. 2012, at 07:25, Vincent Habchi wrote: > http://www.eerolanguage.org. I maintain the package on MacPorts, if you want > to have a try. Should be http://eerolanguage.org. There is no leading www. V. ___ Cocoa-dev mailing list (Cocoa-dev@lists

Re: how to clip inside a path

2012-10-29 Thread Vincent Habchi
On 30 oct. 2012, at 01:24, Jens Alfke wrote: > There was a pretty serious proposal floated on objc-language earlier this > year (by a non-Apple person), but as far as I can tell it devolved into a > bunch of arguing over details, and didn’t go anywhere. (And further > discussion thereof should

Re: how to clip inside a path

2012-10-29 Thread Jens Alfke
On Oct 29, 2012, at 4:11 PM, Graham Cox wrote: > When are we going to get namespaces and put an end to this very major > shortcoming of Obj-C? There was a pretty serious proposal floated on objc-language earlier this year (by a non-Apple person), but as far as I can tell it devolved into a bu

Re: how to clip inside a path

2012-10-29 Thread Graham Cox
On 30/10/2012, at 10:04 AM, Corbin Dunn wrote: > Please don't add generic category names to standard appkit classes (like > NSBezierPath). This could easily conflict with potential names we add in the > future. Either don't use a category, or use a unique prefix for your method > names. Wel

Re: how to clip inside a path

2012-10-29 Thread Roland King
Thanks. That's the code I thought I'd written last night but clearly I hadn't because it wasn't working. I'll start fresh this evening instead of trying to jam it in badly like I was. On 30 Oct, 2012, at 6:47 AM, Graham Cox wrote: > I have the following method in a category on NSBezierPath, w

Re: how to clip inside a path

2012-10-29 Thread Corbin Dunn
On Oct 29, 2012, at 3:47 PM, Graham Cox wrote: > I have the following method in a category on NSBezierPath, which seems to be > what you want, and works in the same way as -addClip: > > > - (void) addInverseClip Please don't add generic category names to standard appkit classes (like NSBezi

Re: how to clip inside a path

2012-10-29 Thread Graham Cox
I have the following method in a category on NSBezierPath, which seems to be what you want, and works in the same way as -addClip: - (void) addInverseClip // this is similar to -addClip, except that it excludes the area bounded by the path instead of includes it. It works by combining t

Re: how to clip inside a path

2012-10-29 Thread Roland King
On 29 Oct, 2012, at 11:43 PM, Ken Thomases wrote: > On Oct 29, 2012, at 8:22 AM, Roland King wrote: > >> I have a graphics context and a path and I want to clip everything inside >> the path, ie not display it, and leave everything outside the path >> displayed. The path is simple and doesn't

Re: how to clip inside a path

2012-10-29 Thread Ken Thomases
On Oct 29, 2012, at 8:22 AM, Roland King wrote: > I have a graphics context and a path and I want to clip everything inside the > path, ie not display it, and leave everything outside the path displayed. The > path is simple and doesn't cross itself, for sake of example it may as well > be a ci

Re: how to clip inside a path

2012-10-29 Thread Vincent Habchi
Roland, > Someone suggested a clip mask, that might work if I can't get the paths to > go; I feel for some reason that a clip mask would be less efficient and this > should be totally do-able with paths and paths are what I naturally have > here. I am not sure if would be less efficient. If I

Re: how to clip inside a path

2012-10-29 Thread Roland King
On 29 Oct, 2012, at 10:38 PM, Vincent Habchi wrote: > Le 29 oct. 2012 à 15:26, Roland King a écrit : > >> Doesn't help I'm afraid. If I only have that one, single, path, the even-odd >> rule returns odd inside the path/circle so it's inside and the non-zero >> returns either 1 or -1 dependin

Re: how to clip inside a path

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 15:26, Roland King a écrit : > Doesn't help I'm afraid. If I only have that one, single, path, the even-odd > rule returns odd inside the path/circle so it's inside and the non-zero > returns either 1 or -1 depending on the order of the control points so either > way so that'

Re: how to clip inside a path

2012-10-29 Thread Roland King
On 29 Oct, 2012, at 9:29 PM, Kyle Sluder wrote: > On Mon, Oct 29, 2012, at 06:22 AM, Roland King wrote: >> I have a graphics context and a path and I want to clip everything inside >> the path, ie not display it, and leave everything outside the path >> displayed. The path is simple and doesn't

Re: how to clip inside a path

2012-10-29 Thread Kyle Sluder
On Mon, Oct 29, 2012, at 06:22 AM, Roland King wrote: > I have a graphics context and a path and I want to clip everything inside > the path, ie not display it, and leave everything outside the path > displayed. The path is simple and doesn't cross itself, for sake of > example it may as well be a

how to clip inside a path

2012-10-29 Thread Roland King
I have a graphics context and a path and I want to clip everything inside the path, ie not display it, and leave everything outside the path displayed. The path is simple and doesn't cross itself, for sake of example it may as well be a circle. If I start with a clip-free GC and set that circle