• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Punching a hole in an NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Punching a hole in an NSImage


  • Subject: Re: Punching a hole in an NSImage
  • From: Ben Lachman <email@hidden>
  • Date: Thu, 2 Mar 2006 11:03:03 -0500

Got it. I was forgetting to transform my rect from view coords to the local image coords, so I was punch the whole somewhere outside the actual image bounds. Thanks for the helps, it works like a charm now.

->Ben
--
The user's going to pick dancing pigs over security every time. — Bruce Schneier


On Mar 2, 2006, at 10:59 AM, Guy English wrote:

Hmmm ... Source Over should do it.

How are you rendering it? If it's in a custom view make sure the view returns NO from isOpaque - also remember Cocoa doesn't make any promises about overlapping views.

On Thursday, March 02, 2006, at 10:55AM, Ben Lachman <email@hidden> wrote:

This was what I was doing, without success.  So maybe it is something
else... when I am passing compositeToPoint: in drawRect what
operation should I use?

->Ben


On Mar 2, 2006, at 9:51 AM, Guy English wrote:

This will make a transparent hole in your image:

[image lockFocus];
[[NSColor clearColor] set];
NSRectFill( rectOfHoleThroughImage );
[image unlockFocus];

Hope that helps,
Guy


On 3/2/06, Ben Lachman <email@hidden> wrote:
What's the easiest way to cut a rect out of an NSImage so that the
view that is behind the image can show though?  I've looked at the
Cropped Image sample code but can't see how that applies to what I
want to do.

Thanks,

->Ben


???????????????????????????????????????? Ben Lachman ? email@hidden email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: 40gmail.com

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Punching a hole in an NSImage (From: Ben Lachman <email@hidden>)
 >Re: Punching a hole in an NSImage (From: "Guy English" <email@hidden>)
 >Re: Punching a hole in an NSImage (From: Ben Lachman <email@hidden>)
 >Re: Punching a hole in an NSImage (From: Guy English <email@hidden>)

  • Prev by Date: Re: Punching a hole in an NSImage
  • Next by Date: Cannot create a foundation tool
  • Previous by thread: Re: Punching a hole in an NSImage
  • Next by thread: Re: Punching a hole in an NSImage
  • Index(es):
    • Date
    • Thread