• 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
Using image as a mask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using image as a mask


  • Subject: Using image as a mask
  • From: email@hidden
  • Date: Tue, 17 Dec 2002 14:04:49 +0000

What compositing action do i need to do to use a black/white tiff as a
mask for what is below it ala alpha Channels.
What im trying to do is set the tint of an image using a color well so
all the black areas in the tiff will gain the selected color when
composited
NSCompositingDestinationIn seems to almost do it but its not quite
working

My testing draw rect method is below



- (void)drawRect:(NSRect)rect
{
[[image backgroundColor] set];
NSRectFill(NSMakeRect(0,0,[image size].width,[image size].height));
[image compositeToPoint:NSZeroPoint operation:compAction];
}

TIA for any help
Warren Burton

**********************************************************************************
This email may contain confidential material. If you were not an
intended recipient, please notify the sender and delete all copies.
We may monitor email to and from our network.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: NSTableView - Alternating blue and white background
  • Next by Date: Need some help with SmallSockets/Networking
  • Previous by thread: Re: A bug in CFPropertyListCreateFromXMLData?
  • Next by thread: Re: Using image as a mask
  • Index(es):
    • Date
    • Thread