SDL_UpdateRect函数
来源:互联网 发布:linux gdb常用命令 编辑:程序博客网 时间:2024/05/14 17:02
SDL_UpdateRect函数
用这个函数来在指定屏幕区域进行更新。在更新之前,需要对表面进行解除锁定。
#include "SDL.h"
void SDL_UpdateRect
(SDL_Surface *screen, Sint32 x, Sint32 y, Sint32 w, Sint32 h);
例子:
if (lpRect != NULL){dstrect.x = (SHORT)((INT)(lpRect->x) * gpScreenReal->w / gpScreen->w);dstrect.y = (SHORT)((INT)(screenRealY + lpRect->y) * screenRealHeight / gpScreen->h);dstrect.w = (WORD)((DWORD)(lpRect->w) * gpScreenReal->w / gpScreen->w);dstrect.h = (WORD)((DWORD)(lpRect->h) * screenRealHeight / gpScreen->h);SDL_SoftStretch(gpScreen, (SDL_Rect *)lpRect, gpScreenReal, &dstrect);if (SDL_MUSTLOCK(gpScreenReal)){SDL_UnlockSurface(gpScreenReal);}SDL_UpdateRect(gpScreenReal, dstrect.x, dstrect.y, dstrect.w, dstrect.h);}
1. C++标准模板库从入门到精通
http://edu.csdn.net/course/detail/3324
2.跟老菜鸟学C++
http://edu.csdn.net/course/detail/2901
3. 跟老菜鸟学python
http://edu.csdn.net/course/detail/2592
4. 在VC2015里学会使用tinyxml库
http://edu.csdn.net/course/detail/2590
5. 在Windows下SVN的版本管理与实战
http://edu.csdn.net/course/detail/2579
6.Visual Studio 2015开发C++程序的基本使用
http://edu.csdn.net/course/detail/2570
7.在VC2015里使用protobuf协议
http://edu.csdn.net/course/detail/2582
8.在VC2015里学会使用MySQL数据库
http://edu.csdn.net/course/detail/2672
0 0
- SDL_UpdateRect函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- jzoj4841 平衡的子集
- Python学习笔记(2)
- 更新GitHub上自己 Fork 的代码与原作者的项目进度一致
- Selenide+cucumber整合到Jenkins
- v4l2基础学习一
- SDL_UpdateRect函数
- Caffe的依赖
- 测试工作中常用到的sql命令!!!
- cs231n学习笔记-CNN-目标检测、定位、分割
- libintl和libiconv在windows+VS2013编译
- qt+mysql+windows
- codesmith学习总结
- codeforces 37E Trial for Chief
- android的录音和播放需要