PDA

View Full Version : vgDrawImage is not working please help!



deepakgarg
08-06-2008, 01:14 AM
hi i am using alexvg implementation of openvg with destination surface being rgb565, i need to draw a 565 image on this surface so i wrote following code, but its not drawing anything can somebody please help

im = vgCreateImage(VG_sRGB_565 , b_rev->rectW, b_rev->rectH, VG_IMAGE_QUALITY_BETTER);
vgImageSubData(im, b_rev->pBits, 2*b_rev->rectW, VG_sRGB_565,0, 0,b_rev->rectW, b_rev->rectH);
vgSeti ( VG_IMAGE_QUALITY, VG_IMAGE_QUALITY_FASTER );
vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE);
vgLoadIdentity();
vgSeti(VG_IMAGE_MODE,VG_DRAW_IMAGE_MULTIPLY);
vgDrawImage(im);

but nothings coming up so i am drawing images through drawing paint patterns and it works, please help me with vgDrawImage(), b_rev is the bitmap to be drawn.

mfabbri
08-06-2008, 02:36 AM
vgSeti(VG_IMAGE_MODE,VG_DRAW_IMAGE_MULTIPLY);
...and where is your paint? maybe your image is multiplied by zero?