compositeToPoint with alpha
compositeToPoint with alpha
- Subject: compositeToPoint with alpha
- From: Lorenzo <email@hidden>
- Date: Wed, 09 Mar 2005 16:06:55 +0100
HI,
I am trying to blend several images in one using different alpha for each
image. I use the API compositeToPoint, but I cannot get the effect I need.
I need the first image looks as originally with alpha = 1.0, then the other
images should have a decreasing alpha value. When I run the code below I get
exactly the opposite, that is the last image is much more visible than the
first one. I presume the error has something to do with multiplying alpha
value, but how to fix the error?
float alpha = 1.0;
int totImages = 10;
for(i = 0; i < totImages; i++){
*anImage = [theImages objectAtIndex:i];
[workImage lockFocus];
[anImage compositeToPoint:NSZeroPoint
fromRect:finalRect operation:NSCompositeSourceOver fraction:alpha];
[workImage unlockFocus];
alpha -= 0.1;
}
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
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