《SDL_FillRect函数.docx》由会员分享,可在线阅读,更多相关《SDL_FillRect函数.docx(1页珍藏版)》请在金锄头文库上搜索。
SDL_FillRect函数SDL_FillRect函数:快速地以指定颜色填充方框。定义:int SDL_FillRect(SDL_Surface* dst, const SDL_Rect* rect, Uint32 color)例子:/* Declaring the surface. */SDL_Surface *s;/* Creating the surface. */s = SDL_CreateRGBSurface(0, width, height, 32, 0, 0, 0, 0);/* Filling the surface with red color. */SDL_FillRect(s, NULL, SDL_MapRGB(s-format, 255, 0, 0);跟老菜鸟学C+http:/