//! lib: .
//! link: pixel
//! win: 
int main4(IVideo* winVideo)
{	
	//prepare screen*

	int retval;   
	//IBITMAP *picture;
	if ((retval = iscreen_init(1024,600, 32,winVideo->hWnd,winVideo)) != 0) {
		printf("error init\n");
		return -1;
	}

	winVideo->paint = ipaint_create(winVideo->cscreen); 
	//picture = ipic_load_file("res_fish.bmp", 0, NULL);
	//assert(picture);    
	//ibitmap_imode(picture, overflow) = IBOM_REPEAT;


	/*while (iscreen_dispatch() == 0) {
		iscreen_tick(30);
		if (iscreen_keyon(IKEY_ESCAPE)) break;

		drawing4();

		iscreen_convert(NULL, 1);
		iscreen_update(NULL, 1);
	}
     */
	return 0;
}
//! lib: .
//! link: pixel
//! win: 
int main2(IVideo* winVideo)
{
	int retval; 
	if ((retval = iscreen_init(800, 600, 32,winVideo->hWnd,winVideo)) != 0) {
		printf("error init\n");
		return -1;
	}

	//drawing canvas
	winVideo->paint = ipaint_create(winVideo->cscreen);
	drawing2(winVideo);

	/*while (iscreen_dispatch() == 0) {
		iscreen_tick(32);
		if (iscreen_keyon(IKEY_ESCAPE)) break;

		iscreen_convert(NULL, 1);
		iscreen_update(NULL, 1);
	}*/

	return 0;
}
//! lib: .
//! link: pixel
//! win: 
int main1(void)
{
	int retval;

	if ((retval = iscreen_init(640, 480, 32)) != 0) {
		printf("error init\n");
		return -1;
	}

	paint = ipaint_create(cscreen);

	drawing1();

	while (iscreen_dispatch() == 0) {
		iscreen_tick(32);
		if (iscreen_keyon(IKEY_ESCAPE)) break;

		iscreen_convert(NULL, 1);
		iscreen_update(NULL, 1);
	}

	return 0;
}