IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    [原]SDL_SoftStretch函数

    caimouse发表于 2016-12-07 16:55:55
    love 0

    SDL_SoftStretch函数

    已经被函数SDL_BlitScaled()替换。缓冲区进行缩放之后拷贝到目标表面。

    extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface *src, SDL_Rect *srcrect,
                                        SDL_Surface *dst, SDL_Rect *dstrect);


    例子:

    //
    		// Draw the backup buffer to the screen
    		//
    		dstrect.x = 0;
    		dstrect.y = screenRealY;
    		dstrect.w = gpScreenReal->w;
    		dstrect.h = screenRealHeight;
    
    		SDL_SoftStretch(gpScreenBak, NULL, gpScreenReal, &dstrect);
    		SDL_UpdateRect(gpScreenReal, 0, 0, gpScreenReal->w, gpScreenReal->h);

    老蔡学堂



沪ICP备19023445号-2号
友情链接