nanogui: Flags in GrCopyArea() and transparency
Subject:
Flags in GrCopyArea() and transparency
From:
Marco Bancale ####@####.####
Date:
23 Aug 2004 16:08:31 +0100
Message-Id: <1943268667.20040823150827@media.is>
Hi!
It's the first time I ask for help here, so please tell me if I'm not
clear enough!
We're developing an Interactive TV system and we use a set top box
running an embedded Linux version with Microwindows0.89pre7_1
Everything seems to work fine, but I got this problem now.
I wrote a small image viewer but when I load a GIF89a with a
transparent color, the transparency is ignored by Microwindows and
it's replaced with black.
This is how I load the image to have the max speed in displaying it:
// load image
idImage = GrLoadImageFromFile("/mnt/nfs/trans.gif", 0);
// create pixmap (sImage comes from GetImageInfo())
idPixmap = GrNewPixmap(sImage.width, sImage.height, NULL);
// Draw the image into the pixmap
GrDrawImageToFit(idPixmap, gc1, 0, 0, sImage.width, sImage.height, idImage);
and then in the exposure event:
// Copy from the pixmap to the window
GrCopyArea(w1, gc1, 0, 0, sImage.width, sImage.height, idPixmap, 0, 0, MWROP_SRCCOPY);
I tried all the MWROP_* flags but it seems that they're ignored, the
image is displayed always the same way (even MWROP_BLACKNESS).
What am I doing wrong?
Could it be a driver issue? Drivers have been written by the company
making the hardware...
Thank you!
Bye Bye
Marco
----------
NovaMedia Hf
Borgartún 30
101 Reykjavík (Iceland)
Phone +354 5911111
http://www.media.is
----------
KISS - Keep It Simple Stupid