OS/2 - Technical => Programming => Topic started by: jep on 2011.06.14, 14:00:03

Title: Image Alpha + Transparency
Post by: jep on 2011.06.14, 14:00:03

I've written a simple C++ class to take care of displaying images that contain transparency and/or alpha with the help of GBM (http://heikon.home.tlink.de/) 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

Compiler: OpenWatcom
Lib-directories: ?:\...\GBM\lib.wat
Libraries: gbm.lib,gbmmem.lib,gbmscale.lib
C++ compiler:
Inlude-directories: ...;?:\...\gbmos2
Title: Re: Image Alpha + Transparency
Post by: jep on 2011.07.05, 11:29:06
6 of you have tried it... any hint on how to adjust it (near line 450 perhaps) so that it look better?!