Archived

This topic is now archived and is closed to further replies.

oooaah

Alpha Blending?

Recommended Posts

I think what I''m trying to do is called alpha blending. What I want is a background bitmap with a slightly transparent box over part of it. This semi-transparent box will serve as a background for text. This way the box will make the text stand out from the bitmap but won''t look too harsh against the bitmap if it was a pure colour. As I might want different sizes of transparent boxes throughout the program I want a method which will enable me to create these boxes to the required size at run time. Any ideas? The early bird may catch the worm but the second mouse gets the cheese.

Share this post


Link to post
Share on other sites
Yes its called alpha blending, if your using directdraw, then your going to have to code it yoursef, by locking the area of the background where the box is, saving all the rgb information of the pixels that are in theat area and and then mix those colors with the pixels of the box, it may take some time to get it right. If your using D3D then you dont need to do it yourself.

PS- it may slow if down quite a bit, but if its for text boxes, which arnt displayed throughout the game I dont think it will slow down that much

Share this post


Link to post
Share on other sites