Re: NSAttributedString fill with gradient

2009-12-19 Thread BravoBug Software
> Why would you even expect that to work? NSGradient is not a colour. At > present there is no supported attribute for gradients. Oh? You might want to let the folks at Apple know that ;) [[NSColor selectedMenuItemColor] set]; NSRectFill(someRect); -matt On Thu, Dec 17, 2009 at 3:50 PM, Grah

Re: breakout game - openGL or quartz?

2009-12-07 Thread BravoBug Software
Everyone seems to have already pointed you in the right direction, but as someone who has specific experience making such a game solo (http://bravobug.com/megabrickbash3000) I wanted to just throw in my .02 that OpenGL is definitely the way to go. NeHe's tutorials will be very handy along the way a

Re: Transparency Help 2

2009-11-23 Thread BravoBug Software
Here is a method that applies 'mask' based on a given NSColor. ie, you pass it an NSImage, a NSColor (in your case, white), and a threshold, and it will make transparent all the pixels of that color within a threshold. So you can use this to knock out the white pixels of an NSImage. Then, of cours

Re: Detecting when sheet has finished appearing

2009-10-10 Thread BravoBug Software
-beginSheet methods return once the sheet has finished animating (IIRC). If you call -beginSheet you can add the code you want to execute after the sheet has been displayed immediately after that (but before any modal calls such as -runModalForWindow). The code will execute after the sheet animatio

Re: Disappearing NSStatusItem

2009-09-25 Thread BravoBug Software
Make sure you're properly -retain'ing it. Just because you have an ivar pointing to it doesn't mean it will stick around after GC/autorelease pool releases stuff. You'll need to explicitly -retain the NSStatusItem since NSStatusBar does not. On Fri, Sep 25, 2009 at 11:21 AM, Jacob Schwartz wrote

Re: drawing/masking one image with the alpha value from another

2009-09-21 Thread BravoBug Software
Modifying the bitmap data yourself shouldn't be too difficult, for an NSBitmapImageRep you'd just grab the data with the -bitmapData method. But have you checked out CIFilter? I'm not entirely sure I understood what your goal is but there's likely a filter in place already that will do it for you:

Re: Possible reasons why "no help is available"?

2009-08-22 Thread BravoBug Software
Here's a walkthrough, in case it might be helpful: http://bravobug.com/news/?p=160 On Fri, Aug 21, 2009 at 4:19 PM, Brant Sears wrote: > Hi. I'm trying to get a Help Book to open for my application. > > I have a pile of .htm and .css files that were given to me by someone who > generated them fro

Re: NSProgressIndicator Subclass is slow

2009-08-21 Thread BravoBug Software
Have you checked this: http://developer.apple.com/qa/qa2006/qa1473.html If it's a redraw issue that should solve your problem. On Fri, Aug 21, 2009 at 3:50 PM, PCWiz wrote: > Hi, > > I have a subclass of NSProgressIndicator I wrote (is attached). I've > overriden the incrementBy: and setMaxValue:

Re: Aqua animations drawing from separate thread

2009-08-15 Thread BravoBug Software
If you don't need to do secondary-thread drawing in your view, you don't have to. You can check which thread is sending the -drawRect method. Allow the subviews such as the aqua button to draw themselves, and skip over any thread-unsafe custom -drawRect stuff in your superview. The only thing you