• 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
NSImage Gradient Mask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSImage Gradient Mask


  • Subject: NSImage Gradient Mask
  • From: Jerry Brace <email@hidden>
  • Date: Wed, 24 May 2006 11:19:12 -0230

I am trying to replicate the image reflection you see for example in FrontRow with the album covers. The image is reflected by flipping and applying a gradient mask.
I've been trying to figure this out using a source image of an album cover and a second tif image with a black to white gradient for the mask.


Here is my code - which does not provide the effect - any help would be great.

NSImage *sourceImage = [NSImage imageNamed:@"album1.tif"];
NSImage *reflectImage = [NSImage imageNamed:@"reflect.tif"];

NSImage* result = [sourceImage copy];
[result lockFocus];
[reflectImage compositeToPoint: NSMakePoint(0,0) operation:NSCompositeSourceIn];
[result unlockFocus];


	[myView setImage:result];

Jerry
_______________________________________________
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


  • Follow-Ups:
    • Re: NSImage Gradient Mask
      • From: George Orthwein <email@hidden>
  • Prev by Date: Re: Appropriate size for a window.
  • Next by Date: RE: Providing global floating window
  • Previous by thread: Re: Xcode 2.3 and May Documentation Update
  • Next by thread: Re: NSImage Gradient Mask
  • Index(es):
    • Date
    • Thread