Alpha Blending?

Started by
2 comments, last by oooaah 21 years, 11 months ago
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.
The early bird may catch the worm but the second mouse gets the cheese ;)
Advertisement
API?
Using DirectX 7.0 and C++.

The early bird may catch the worm but the second mouse gets the cheese.
The early bird may catch the worm but the second mouse gets the cheese ;)
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

This topic is closed to new replies.

Advertisement