Bryan Bui-Tuong wrote: > Well I have other things on my screen drawn out such as the following: > > > //this is my window > Main { > .............. > ... > rect.x = 0; rect.y = 0; rect.w = 320; rect.h = 240; //Screen > dimensions > lite_new_window( NULL, &rect, DWCAPS_NODECORATION, > liteNoWindowTheme, NULL, &screen ); > > lite_set_window_background_color( screen, white.r, white.g, white.b, > white.a ); > lite_hide_cursor(); > lite_set_window_opacity( screen, liteFullWindowOpacity ); > ... > Function1 > Function2 > ... > } > > > //I am placing this image on one location, and I want to draw on top of it > (you can see the coordinates are similar in the code below) > Function1{ > DFBRectangle rect; > LiteImage *image; > > /* setup image */ > rect.x = 185; rect.y = 4; rect.w = 56; rect.h = 20; > lite_new_image(LITE_BOX(window), &rect, liteNoImageTheme, &image); > > lite_load_image( image, "image.png" ); > } >
So you see the image at least? > //And then I attempt to draw a figure: > Function2{ > static IDirectFBSurface *batt = NULL; > static LiteBox *batt_stat = NULL; > static DFBRectangle batt_rect[2]; > > batt_rect[0].x = 188; batt_rect[0].y = 7; batt_rect[0].w = 47; > batt_rect[0].h = 14; > batt_rect[1].x = 235; batt_rect[1].y = 9; batt_rect[1].w = 3; > batt_rect[1].h = 10; > > lite_new_box( &batt_stat, LITE_BOX(window), 188, 7, 50, 14 ); > lite_init_box( batt_stat ); > > batt = batt_stat->surface; > > batt->SetColor( batt, green.r, green.g, green.b, green.a ); //green > batt->FillRectangles( batt, batt_rect, 2 ); > batt->Flip( batt, NULL, 0 ); > } Then this should show something as well. -- Best regards, Denis Oliver Kropp .------------------------------------------. | DirectFB - Hardware accelerated graphics | | http://www.directfb.org/ | "------------------------------------------" _______________________________________________ directfb-users mailing list directfb-users@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users