Re: NSShadow with [bezierPath addClip]

2014-01-25 Thread Kevin Meaney
> > Hi David, > After a few days using CGContextBeginTransparencyLayer > I have just noticed that the text I draw on a trasparent background with > >[super drawRect:rect]; // we are in a drawRect: method of a NSTextView > > looks without antialias. No matter whether I add before Antialiasi

Re: NSShadow with [bezierPath addClip]

2014-01-25 Thread Leonardo
ed, 01 Jan 2014 17:44:01 -0800 > A: Leonardo > Cc: Cocoa-dev > Oggetto: Re: NSShadow with [bezierPath addClip] > > In CoreGraphics the way you would do this is to setup your shadow parameters, > then start a transparency layer, do your drawing there, then composite that > b

Re: NSShadow with [bezierPath addClip]

2014-01-03 Thread Gordon Apple
Whoa! I fired that off without thinking. The problem was with AVCapturePreviewLayer, not AVPlayerLayer. I logged that and apparently it sets it to YES internally. I set it to NO and am now getting a shadow for the unmasked version. However, I do (optionally) apply a shaped masking layer, which

Re: NSShadow with [bezierPath addClip]

2014-01-03 Thread Gordon Apple
The default of masksToBounds in CALayer is NO. I had my subclass of AVPlayerLayer log it, and it does show it is still NO. On 1/3/14 3:18 PM, "David Duncan" wrote: > On Jan 3, 2014, at 11:09 AM, Gordon Apple wrote: > >> David, >> >> Now, if someone could just tell me why AVPlayerLayer won¹t

Re: NSShadow with [bezierPath addClip]

2014-01-03 Thread David Duncan
On Jan 3, 2014, at 11:09 AM, Gordon Apple wrote: > David, > > Now, if someone could just tell me why AVPlayerLayer won¹t produce a shadow, > when there is no such problem with QTMovieLayer in the same environment... Is masksToBounds set to YES on the layer? -- David Duncan ___

Re: NSShadow with [bezierPath addClip]

2014-01-03 Thread Gordon Apple
-0800 From: David Duncan > To: Leonardo Cc: Cocoa-dev > Subject: Re: NSShadow with [bezierPath addClip] > Message-ID: Content-Type: > text/plain; charset=us-ascii In CoreGraphics the way you would do this is to > setup your shadow parameters, then start a transparency layer, do yo

Re: NSShadow with [bezierPath addClip]

2014-01-02 Thread Leonardo
Many thanks David. That did the trick. Regards -- Leonardo > Da: David Duncan > Data: Wed, 01 Jan 2014 17:44:01 -0800 > A: Leonardo > Cc: Cocoa-dev > Oggetto: Re: NSShadow with [bezierPath addClip] > > In CoreGraphics the way you would do this is to setup your shad

Re: NSShadow with [bezierPath addClip]

2014-01-01 Thread David Duncan
In CoreGraphics the way you would do this is to setup your shadow parameters, then start a transparency layer, do your drawing there, then composite that back to the original context. Something like this: CGContextSetShadow(context, shadowOffset, shadowBlur); CGContextBeginTransparencyLayer(cont

Re: NSShadow with [bezierPath addClip]

2013-12-31 Thread Leonardo
a Developers > Oggetto: Re: NSShadow with [bezierPath addClip] > > On 31 Dec 2013, at 6:15 AM, Leonardo wrote: > >> In my NSView subclass, I have to draw an image within a bezierPath and apply >> an NSShadow to the result. >> So within the drawRect: method I ad

Re: NSShadow with [bezierPath addClip]

2013-12-31 Thread Fritz Anderson
On 31 Dec 2013, at 6:15 AM, Leonardo wrote: > In my NSView subclass, I have to draw an image within a bezierPath and apply > an NSShadow to the result. > So within the drawRect: method I add > > [bezierPath addClip]; > [mImage drawInRect:inRect fromRect:fromRect > operation:NSCompositeSo

NSShadow with [bezierPath addClip]

2013-12-31 Thread Leonardo
In my NSView subclass, I have to draw an image within a bezierPath and apply an NSShadow to the result. So within the drawRect: method I add [bezierPath addClip]; [mImage drawInRect:inRect fromRect:fromRect operation:NSCompositeSourceOver fraction:mOpacity]; It works. The image gets cli