zl程序教程

您现在的位置是:首页 >  其它

当前栏目

SDL_FillRect函数

函数 SDL
2023-09-14 09:16:24 时间

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++