PDA

View Full Version : Filter effect




mahaboob
Jun 25, 2009, 07:55 AM
Hi,
I'm applying filter effects to my graphics in drawRect: method.
I need to draw the selection handles for graphics after applying filters.
is it possible to apply the filters from slider action methods of filters?

Now I'm using the code in drawRect: method is :


NSRect _tFr = [self bounds];

CIContext *mCIContext;

mCIContext = [CIContext contextWithCGContext: [[NSGraphicsContext currentContext] graphicsPort] options: nil];

CIImage *iImage = [self CIImageofPath:_tpath inView:view],

*rImage = [self CIImageResultForEffectStack:iImage];

[mCIContext drawImage:rImage atPoint:CGPointMake(_tFr.origin.x,_tFr.origin.y) fromRect:[rImage extent]];



In the slider action method I'm getting the result graphics by applying the same method.

Now, how can I draw this graphic in to my canvas?

Thanking you in advance
Mahaboob.