O'Reilly logo

Software Engineering and Computer Games by Rudy Rucker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

31.3. Transparent bitmaps

We have the option with the cSpriteIcon of giving it a ‘transparent background.’ The reason we’ll be interested in transparent backgrounds is that we want to have a cSpriteIcon that shows a bitmap sliding around like a little live creature. If you have two normal bitmaps pasted on the screen close to each other, then the background region of one bitmap is likely to cut an unattractive white corner out of the other bitmap’s central image.

How is this effect to be achieved? Since there is a simple way to make text and dotted line backgrounds transparent with the CDC::SetBkMode(TRANSPARENT) call, you might think it’s easy to make bitmaps have transparent backgrounds. But this is not the case. Making bitmaps with transparent ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required