Alpha blending

Alpha blending

Post by Mr. de Boe » Tue, 18 Jul 2000 04:00:00



Hi all,

In Windows2000 is it possible to make a form a bit transparent by using
the alpha blending API of Windows2000.

Does anyone know how to make the same effect under Windows systems other
Windows2000 ?

Yours,

Weyert R. de Boer

 
 
 

Alpha blending

Post by Feng Yua » Thu, 20 Jul 2000 04:00:00


Yes, you can use AlpahBlend, or TransparentBlt, both available on Windows
98/Me, also with reported memory leak.

For other systems, use raster operationg/clipping, implement your own
solution, or wait for GDI+.

Feng Yuan
=========
Windows Graphics Programming: Win32 GDI and DirectDraw
FatBrain
http://www1.fatbrain.com/asp/bookinfo/bookinfo.asp?theisbn=0130869856
Barnes & Noble
http://shop.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=013086...

 
 
 

1. alpha blending code to blend within 0xff-220

below is my alpha blending code but it does blend from opaque (0xff) to
transparent within about 30 steps (so 0xff-220 approx. and 220-0 seems
ignored as just nothing happens).

can anybody explain me why ? the code looks okay to me, using the formula:
dst + (src - dst) * alpha

   src = pixel[offset];
   dst =   ptr[offset];

         pixel[offset] = ARGB.ALPHA
                 | ARGB.RED   & (dst & ARGB.RED)   + ((((src & ARGB.RED)   -
(dst & ARGB.RED))   * alpha) >> 8)
                 | ARGB.GREEN & (dst & ARGB.GREEN) + ((((src & ARGB.GREEN) -
(dst & ARGB.GREEN)) * alpha) >> 8)
                 | ARGB.BLUE  & (dst & ARGB.BLUE)  + ((((src & ARGB.BLUE)  -
(dst & ARGB.BLUE))  * alpha) >> 8);

2. server always not responding?

3. Additive Blending Effects and other alpha blending mysteries

4. ANNOUNCE: Vendor Seminar for Earth Observation Data Access

5. alpha channel when alpha blending

6. SLA marbel shader

7. Does DX support alpha blend for alpha!!!

8. Boolean operations

9. Alpha blending algorithm

10. Antialiasing/Alpha Blending with Background

11. Alpha Blending for sprites

12. : Compositing and Alpha Blending

13. Quick Draw Alpha Blending