Re: Creating reflected style Images from NSImage
Re: Creating reflected style Images from NSImage
- Subject: Re: Creating reflected style Images from NSImage
- From: "Stephen Deken" <email@hidden>
- Date: Thu, 28 Sep 2006 13:26:16 -0500
I know how to use Core Image code and transformations, but do
not see code that would do this effect. Or can it be simply done
using NSImage draw calls or Quartz draw commands, with a given alpha
mask? If there is a source example of this online, I am missing it.
The easiest way is probably to use NSAffineTransform to flip it in the
y direction:
NSAffineTransform *tr = [[NSAffineTransform alloc] init];
[tr setScaleXBy:1 yBy:-1];
[tr set];
// draw with -[NSImage draw:atPoint:fromRect:operation:fraction:]
or whatever
Drawing the gradient, etc, would be done with the standard Quartz
gradient jibberish. If you use an NSImage as a buffer, you could draw
the gradient into that with whatever alpha values you'd like, then
composite your image over it (after setting the transformation) using
the NSCompositeSourceAtop operator.
--sjd;
_______________________________________________
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