test/testdrawchessboard.c
changeset 8058 8e4512b74223
parent 7905 586eddae6340
child 8149 681eb46b8ac4
equal deleted inserted replaced
8057:801d84e26f91 8058:8e4512b74223
    32 	{
    32 	{
    33 		coloum = row%2;
    33 		coloum = row%2;
    34 		x = x + coloum;
    34 		x = x + coloum;
    35 		for(coloum; coloum < 4+(row%2); coloum++)
    35 		for(coloum; coloum < 4+(row%2); coloum++)
    36 		{
    36 		{
    37 			SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0);
    37 			SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0xFF);
    38 
    38 
    39 			rect.w = darea.w/8;
    39 			rect.w = darea.w/8;
    40 			rect.h = darea.h/8;
    40 			rect.h = darea.h/8;
    41 			rect.x = x * rect.w;
    41 			rect.x = x * rect.w;
    42 			rect.y = row * rect.h;
    42 			rect.y = row * rect.h;
    79 		SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Render creation for surface fail : %s\n",SDL_GetError());
    79 		SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Render creation for surface fail : %s\n",SDL_GetError());
    80 		return 1;
    80 		return 1;
    81 	}
    81 	}
    82 
    82 
    83 	/* Clear the rendering surface with the specified color */
    83 	/* Clear the rendering surface with the specified color */
    84 	SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0);
    84 	SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF);
    85 	SDL_RenderClear(renderer);
    85 	SDL_RenderClear(renderer);
    86 
    86 
    87 
    87 
    88 	/* Draw the Image on rendering surface */
    88 	/* Draw the Image on rendering surface */
    89 	while(1)
    89 	while(1)