Need to set transparency to a image widget | developer.brewmp.com Need to set transparency to a image widget | developer.brewmp.com

Developer

Need to set transparency to a image widget

Forums:

Hi,

I need to use an image as an highlight for a list widget,but this highlight widget need to be transparent so that the list item contents are visible.
I created the widget my code snippet below
----------------------------------------------------------------------------------------------------
IWidget* HighLightImage =NULL;
IImage* piImage = NULL;
result = ISHELL_CreateInstance(pMe->cdata.piShell, AEECLSID_IMAGEWIDGET,(void**)&HighLightImage);

piImage = ISHELL_LoadResImage(pMe->cdata.piShell,RES_FILE,RES_ID_HIGHLIGHT);

if(piImage && pMe->piHighLightImage)
{
IIMAGE_SetParm(piImage, IPARM_ROP, AEE_RO_MASK, 0);
IWIDGET_SetImage(HighLightImage, piImage);
RELEASEIF(piImage);

IWIDGET_SetTransparency(HighLightImage, 64);
----------------------------------------------------------------------------------------------------
The image is a white strip of height and width same as that of the list item.
My requirement is that if i make the image widget transparent the list item shall be visible.
But the IWIDGET_SetTransparency(HighLightImage, 64); is not working

Could any one help me with this.

Thanks u all in advance,
Raji

If you need a general way to implement image transparency then you can checkout the following post..
http://brewforums.qualcomm.com/showthread.php?postid=66791#poststop

If you need a general way to implement image transparency then you can checkout the following post..
http://brewforums.qualcomm.com/showthread.php?postid=66791#poststop

Isn't there any need for the image to support alpha blending to have this feature ? I thought that was a default way to set transparency.

Isn't there any need for the image to support alpha blending to have this feature ? I thought that was a default way to set transparency.

IWIDGET_SetTransparency() will not set the transparency of the image. You should either use an image with an alpha channel, or use a blend widget to blend the image widget with the background.
-Erik

IWIDGET_SetTransparency() will not set the transparency of the image. You should either use an image with an alpha channel, or use a blend widget to blend the image widget with the background.
-Erik

Erik,
Thanks a lot it worked. :)
Regards,
Raji

Erik,
Thanks a lot it worked. :)
Regards,
Raji