• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

Image Alpha + Transparency

Started by jep, 2011.06.14, 15:00:03

Previous topic - Next topic

jep

Hello,

I've written a simple C++ class to take care of displaying images that contain transparency and/or alpha with the help of GBM by Heiko Nitzsche. I've also tried to make it more robust and forgiving than the examples I've seen elsewhere, so that it can handle situations/configurations where e.g. transparency support isn't available (SVGA graphics driver).

I've borrowed one of the images that come with the screen saver that display a nice clock made by Doodle.

I do however need your help with the provided example to:
a) Get smoother edges as compared to if you remove // in front of the line MeterImage.mapTransparancy2Color( CLR_PALEGRAY );
b) Reduce memory consumption as the code has to be rewritten to take care of it better.
c) A function to allow it to drawAt( HPS hps, int x, int y )
d) Allow it to share bitmaps to mix several images together
...

Your help is greatly appreciated
//Jan-Erik

Compiler: OpenWatcom
Linker:
Lib-directories: ?:\...\GBM\lib.wat
Libraries: gbm.lib,gbmmem.lib,gbmscale.lib
C++ compiler:
Inlude-directories: ...;?:\...\gbmos2

jep

#1
6 of you have tried it... any hint on how to adjust it (near line 450 perhaps) so that it look better?!