NSImage Gradient Mask
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