The Khronos Group - a non-profit industry consortium to develop, publish and promote open standard, royalty-free media authoring and acceleration standards for desktop and handheld devices, combined with conformance qualification programs for platform and device interoperability.

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I can see a red square without any alpha shading or gradation.
I checked that the image is OK in memory (alpha changes).
I have the same behavior with a png image (image OK but no alpha change).
Do I have to enable blending with a specific command (change VG_IMAGE_MODE? VG_COLOR_TRANSFORM?)

Re: alpha value when drawing image

When I render images I use:
vgSeti( VG_IMAGE_MODE, VG_DRAW_IMAGE_NORMAL );
If I need to add a global alpha blend then I set:
// set the global alpha in the color
vgSetParameterfv(mgr->paint, VG_PAINT_COLOR, 4, col);
vgSeti( VG_IMAGE_MODE, VG_DRAW_IMAGE_MULTIPLY );

This works for png files with per pixel alpha. As a side note I get much better performance when using a pre-multiplied image format.

Re: alpha value when drawing image

Originally Posted by brian.edmond

When I render images I use:
vgSeti( VG_IMAGE_MODE, VG_DRAW_IMAGE_NORMAL );
If I need to add a global alpha blend then I set:
// set the global alpha in the color
vgSetParameterfv(mgr->paint, VG_PAINT_COLOR, 4, col);
vgSeti( VG_IMAGE_MODE, VG_DRAW_IMAGE_MULTIPLY );

This works for png files with per pixel alpha. As a side note I get much better performance when using a pre-multiplied image format.