SDL函數說明

  • SDL_SetVideoMode
    設置圖像模式
    SDL_Surface *SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
            Set up a video mode with the specified width, height and bits-per-pixel.
    Return Value
             The framebuffer surface, or NULL if it fails. The surface returned is freed by SDL_Quit() and should nt be freed by the caller.
  • SDL_WM_SetCaption
    void SDL_WM_SetCaption(const char *title, const char *icon)
        Sets the title-bar and icon name of the display window.
  • IMG_Load函數

         SDL_Surface *IMG_load( char *filename)

         功能:加載圖象文件

         它是擴展庫中的一個導入圖象的函數,支持的圖象格式有BMP, PNM, XPM, LBM, PCX, GIF, JPEG, TGA 和PNG。

  • SDL_DisplayFormat函數

         SDL_Surface *SDL_DisplayFormat(SDL_Surface *image)

         功能:建立最佳圖象

         它會將圖象的格式轉換爲同屏幕相同的格式。這樣,如果出現32bit、24bit的圖片,都將統一格式顯示。但會降低速度。

  • SDL_BlitSurface

         顯示圖像
         SDL_BlitSurface(SDL_Surface *source, NULL,  SDL_Surface* destination,  SDL_Rect *offset )
         其中SDL_Rect是矩形座標。它將source圖象按照Offset規定的座標貼在destination屏幕上。

  • SDL_Flip

          更新屏幕

  • SDL_FreeSurface

          釋放圖象

 

 

 

sdl (3)
Simple DirectMedia Layer for Perl
sdl_activeevent (3)
sdl_addtimer (3)
sdl_audiocvt (3)
sdl_audiospec (3)
sdl_blitsurface (3)
sdl_buildaudiocvt (3)
sdl_cd (3)
sdl_cdclose (3)
sdl_cdeject (3)
sdl_cdname (3)
sdl_cdnumdrives (3)
sdl_cdopen (3)
sdl_cdpause (3)
sdl_cdplay (3)
sdl_cdplaytracks (3)
sdl_cdresume (3)
sdl_cdstatus (3)
sdl_cdstop (3)
sdl_cdtrack (3)
sdl_closeaudio (3)
sdl_color (3)
sdl_condbroadcast (3)
sdl_condsignal (3)
sdl_condwait (3)
sdl_condwaittimeout (3)
sdl_convertaudio (3)
sdl_convertsurface (3)
sdl_createcond (3)
sdl_createcursor (3)
sdl_createmutex (3)
sdl_creatergbsurface (3)
sdl_creatergbsurfacefrom (3)
sdl_createsemaphore (3)
sdl_createthread (3)
sdl_createyuvoverlay (3)
sdl_delay (3)
sdl_destroycond (3)
sdl_destroymutex (3)
sdl_destroysemaphore (3)
sdl_displayformat (3)
sdl_displayformatalpha (3)
sdl_displayyuvoverlay (3)
sdl_enablekeyrepeat (3)
sdl_enableunicode (3)
sdl_event (3)
sdl_eventstate (3)
sdl_exposeevent (3)
sdl_fillrect (3)
sdl_flip (3)
sdl_freecursor (3)
sdl_freesurface (3)
sdl_freewav (3)
sdl_freeyuvoverlay (3)
sdl_getappstate (3)
sdl_getaudiostatus (3)
sdl_getcliprect (3)
sdl_getcursor (3)
sdl_geterror (3)
sdl_geteventfilter (3)
sdl_getgamma (3)
sdl_getgammaramp (3)
sdl_getkeyname (3)
sdl_getkeystate (3)
sdl_getmodstate (3)
sdl_getmousestate (3)
sdl_getrelativemousestate (3)
sdl_getrgb (3)
sdl_getrgba (3)
sdl_getthreadid (3)
sdl_getticks (3)
sdl_getvideoinfo (3)
sdl_getvideosurface (3)
sdl_gl_getattribute (3)
sdl_gl_getprocaddress (3)
sdl_gl_loadlibrary (3)
sdl_gl_setattribute (3)
sdl_gl_swapbuffers (3)
sdl_glattr (3)
sdl_init (3)
sdl_initsubsystem (3)
sdl_joyaxisevent (3)
sdl_joyballevent (3)
sdl_joybuttonevent (3)
sdl_joyhatevent (3)
sdl_joystickclose (3)
sdl_joystickeventstate (3)
sdl_joystickgetaxis (3)
sdl_joystickgetball (3)
sdl_joystickgetbutton (3)
sdl_joystickgethat (3)
sdl_joystickindex (3)
sdl_joystickname (3)
sdl_joysticknumaxes (3)
sdl_joysticknumballs (3)
sdl_joysticknumbuttons (3)
sdl_joysticknumhats (3)
sdl_joystickopen (3)
sdl_joystickopened (3)
sdl_joystickupdate (3)
sdl_keyboardevent (3)
sdl_keysym (3)
sdl_killthread (3)
sdl_listmodes (3)
sdl_loadbmp (3)
sdl_loadwav (3)
sdl_lockaudio (3)
sdl_locksurface (3)
sdl_lockyuvoverlay (3)
sdl_maprgb (3)
sdl_maprgba (3)
sdl_mixaudio (3)
sdl_mousebuttonevent (3)
sdl_mousemotionevent (3)
sdl_mutexp (3)
sdl_mutexv (3)
sdl_numjoysticks (3)
sdl_openaudio (3)
sdl_overlay (3)
sdl_palette (3)
sdl_pauseaudio (3)
sdl_peepevents (3)
sdl_pixelformat (3)
sdl_pollevent (3)
      Polls for currently pending events.
sdl_pumpevents (3)
sdl_pushevent (3)
sdl_quit (3)
sdl_quitevent (3)
sdl_quitsubsystem (3)
sdl_rect (3)
sdl_removetimer (3)
sdl_resizeevent (3)
sdl_rwfromfile (3)
sdl_savebmp (3)
sdl_sempost (3)
sdl_semtrywait (3)
sdl_semvalue (3)
sdl_semwait (3)
sdl_semwaittimeout (3)
sdl_setalpha (3)
sdl_setcliprect (3)
sdl_setcolorkey (3)
sdl_setcolors (3)
sdl_setcursor (3)
sdl_seteventfilter (3)
sdl_setgamma (3)
sdl_setgammaramp (3)
sdl_setmodstate (3)
sdl_setpalette (3)
sdl_settimer (3)
sdl_setvideomode (3)
sdl_showcursor (3)
sdl_surface (3)
sdl_syswmevent (3)
sdl_threadid (3)
sdl_unlockaudio (3)
sdl_unlocksurface (3)
sdl_unlockyuvoverlay (3)
sdl_updaterect (3)
sdl_updaterects (3)
sdl_userevent (3)
sdl_videodrivername (3)
sdl_videoinfo (3)
sdl_videomodeok (3)
sdl_waitevent (3)
sdl_waitthread (3)
sdl_warpmouse (3)
sdl_wasinit (3)
sdl_wm_getcaption (3)
sdl_wm_grabinput (3)
sdl_wm_iconifywindow (3)
sdl_wm_setcaption (3)
sdl_wm_seticon (3)
sdl_wm_togglefullscreen (3)
sdlkey (3)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章