Black box around bitmaps

Black box around bitmaps

Post by Ian Jir » Thu, 23 Jun 1994 08:00:27



Hello.  I've been programming a little 3-d demo that spins balls in a
circle.  My only problem is that the black space around the bitmap of
the ball is pasted onto the screen as well as the bitmap of the ball.
When I use more than one ball, the other balls get clipped and the
whole result is ugly.  Is there any way to set a transparent color
without having to roll my own funtion?

Thanks in advance...

-------------------------------------------------------------------------
-Ian Jirka                              | No Fancy Artwork Here!


 
 
 

Black box around bitmaps

Post by Edward Mccrea » Fri, 24 Jun 1994 00:11:36


   Hello.  I've been programming a little 3-d demo that spins balls in a
   circle.  My only problem is that the black space around the bitmap of
   the ball is pasted onto the screen as well as the bitmap of the ball.
   When I use more than one ball, the other balls get clipped and the
   whole result is ugly.  Is there any way to set a transparent color
   without having to roll my own funtion?

The Win16 API has no built in support for tranparent blts, unlike the
Win32 API.  There's example code on ftp.microsoft.com on how to do
both sprites using DIBs and transparent blts with DDBs.  Take an
evening and browse the site, you won't regret it.

--

Graphics Development                    "Do or do not, there is no 'try'."
  In the event of my capture, Compaq will disavow any and all knowledge
          of my operations.  Of course I don't speak for them.

 
 
 

Black box around bitmaps

Post by Chris Marrio » Sat, 25 Jun 1994 08:05:58



>Hello.  I've been programming a little 3-d demo that spins balls in a
>circle.  My only problem is that the black space around the bitmap of
>the ball is pasted onto the screen as well as the bitmap of the ball.
>When I use more than one ball, the other balls get clipped and the
>whole result is ugly.  Is there any way to set a transparent color
>without having to roll my own funtion?

No, you need to use a "mask" operation. Take a look at the "Bitmaps with
Transparency" technote for sample code.

Chris
--
--------------------------------------------------------------------------
| Chris Marriott, Warrington, UK      | Author of SkyMap v2 shareware    |

| CompuServe: 100113,1140             | Mail me for details!             |
|      Author member of Association of Shareware Professionals (ASP)     |
|       Windows, C/C++ consultancy undertaken, anywhere in the world.    |
--------------------------------------------------------------------------

 
 
 

1. AnimateWindow() causes Black Box around region shaped window

Hi All,

Setup:
  I'm using AnimateWindow() to fade in a window in my app.
  The window is shaped using a region.

Problem:
  On a very small set of computers, I'm seeing the full rectangular area of
the window (outside the shaped area) being painted black.
  This nasty artifact stays on the desktop until something clears it away.

The one machine we had which could duplicate this stopped having the problem
when it's graphics drivers were reinstalled, but now we're doing bigger
tests and I'm seeing it on my new GeForce3 card at home as well.

The MSDN on AnimateWindow() says that it will fail if you use it when  "The
window uses the window region", but it _is_ working in 99% of the test cases
we've tried it on so far (about 50 computers with varying installations), so  
I figured they mean something else bye "using the window region".

Any ideas 'bout this?

Thanks!

-Mike

2. HELP! Big mailing -> high server load

3. Comments on black-box and white-box testing

4. ppp on demand

5. Change days of notification of password expire.

6. Black Box Vs White Box

7. tms320c31 lunatic behaviour!

8. BLACK Bitmaps

9. BLACK Bitmaps!

10. Black and white bitmap

11. coverting truetype font to bitmap (black and white)

12. Black Boxes for Icons