What? It does too work! Once the window is setup correctly.

This is how a do all my transparent windows, and for any naysayers out there 
here is the code:
http://www.inksystemsinc.com/images/lshaped_window_proof.tar.gz

It is obviously not as simple as the two sudo lines of code I put there, but I 
was trying not write the damn things for him, and set him on the write path 
instead, as I'm sure with the Transparent window samples available on the net 
and in the docs he can manage to figure out how to setup the window and view 
for this to work, and now instead of him figuring it out (learning to fish), I 
did it for him and it took me all but 5 minutes using code I already had 
written (you made me toss him fish instead, just to show it CAN be done) :)

Filling a rect DOES NOT NUKE anything, you simply need to override the defaults 
which are optimized for rectangular non transparencies areas to make them 
faster. It's not that they can't its just faster not too, so that is the 
default.



> Date: Wed, 4 May 2011 18:02:56 -0700
> Subject: Re: L-shaped custom view in Cocoa?
> From: kyle.slu...@gmail.com
> To: shashan...@hotmail.com
> CC: cocoa-dev@lists.apple.com
> 
> On Wed, May 4, 2011 at 1:09 PM, Shawn Bakhtiar <shashan...@hotmail.com> wrote:
> > Actually you only need one view. Subclass it, and over ride the draw method
> >
> >
> >
> > [[NSColor clearColor] set]
> > NSFillRect(...) <- the size you want to clear out.
> >
> 
> Don't do this. It doesn't do what you think it does.
> 
> The window only has one backing store bitmap. All normal views are
> drawn into this bitmap in order. So filling a rect with clearColor
> actually nukes the background of the window. It'll draw as a black
> rectangle on your screen.
> 
> --Kyle Sluder
                                          
_______________________________________________

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

Reply via email to