site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=LMhptDUJ0Gw5W8no150gvxcZUmGqTy22PJXJTFjE1ag=; b=ESkGyXXD1o5UoOZMRBs6qKoz0Us7JUBW5F67Gp8yT4L2ZqInZEYBtymVskSovy19f6 80oKSn5kM6oSgAg/48muneFiY7dMufR63h01GtJoFgGGcLxQcPnIKZUqW3CONkAkwDoH JHFtRPcHrgKAG71cS7zL5spWVdjf+G39yObV4= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=q672E+VnnbNthroB8nHGP/qaz9cRRqt4AfdepL7+m9cYQacuMXYhWfeq5JYjInKClW IBQAV+MCYvGugoAITUShjzbE/tQYLMr0GNt4z0GQv9Q/rUUovtm3R8rm2ceV5grLnz24 tCfWl75SHRnIqRCXMkWNYcLT3iz8U5gPVOT94= Joar hello. mmm.. well.. Its a custom NSView, which is drawing all 9 images to generate the menu bounds, same as in the Dock, Im trying to recreate that menu for my application. All images are are .png with transparency value. So its not an NSMenu, because this custom menu Im displaying when clicking a special part of the window.
It might not be as bad as it sounds. Using CGWindowListCreateImage() + kCGWindowListOptionOnScreenBelowWindow could be all that you need. This API is pretty accessible and easy to use. I would expect for you to be able to get something working in a couple of hours. You should be able to get the window of the menu from the view when it's asked to draw. Not sure if there's anything in the timing of the display of the menu view that would make this more difficult than it appears.
MM I will check this... thanks for the help :) Gustavo On Jan 1, 2010, at 8:23 PM, Joar Wingfors wrote:
On 1 jan 2010, at 08.37, Gustavo Pizano wrote:
First Im using the method NSDrawNinePartImage to draw the box that appears when click an item, this receives NSImages, so I thought that applying a CIfilter to a CIImage then converting the CIImage into a NSImage and send to the NSDrawNinePartImage method will do the trick.. but of course this doesn't happen.
What doesn't happen? I'm not sure if you're supposed to get the blurred background for free when using menu item views, but it sounds like a reasonable expectation if you're drawing something that's not opaque. You are drawing non-opaque images, right? Please file a bug report / enhancement request if you feel that the menu item view drawing should work differently:
<http://developer.apple.com/bugreporter/>
On 1 jan 2010, at 09.47, Gustavo Pizano wrote:
OUCH!!! that hurts! :(.
It might not be as bad as it sounds. Using CGWindowListCreateImage() + kCGWindowListOptionOnScreenBelowWindow could be all that you need. This API is pretty accessible and easy to use. I would expect for you to be able to get something working in a couple of hours. You should be able to get the window of the menu from the view when it's asked to draw. Not sure if there's anything in the timing of the display of the menu view that would make this more difficult than it appears.
j o a r
_______________________________________________ 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/site_archiver%40lists.apple... This email sent to site_archiver@lists.apple.com