sdl Reference Manual

Synopsis

public class Surface {
    public    uint32                    flags ;
    public    PixelFormat               format ;
    public    int                       w ;
    public    int                       h ;
    public    uint16                    pitch ;
    public    void**                    pixels ;
    public    int                       ref_count ;


    public                              Surface.RGB               ( uint32              flags,
                                                                    int                 width,
                                                                    int                 height,
                                                                    int                 depth,
                                                                    uint32              rmask,
                                                                    uint32              gmask,
                                                                    uint32              bmask,
                                                                    uint32              amask ) ;
    public                              Surface.from_RGB          ( void**              pixels,
                                                                    int                 width,
                                                                    int                 height,
                                                                    int                 depth,
                                                                    int                 pitch,
                                                                    uint32              rmask,
                                                                    uint32              gmask,
                                                                    uint32              bmask,
                                                                    uint32              amask ) ;
    public                              Surface.load              ( RWops               src,
                                                                    int                 freesrc = ÿ% ) ;


    public    void                      update_rects              ( int                 numrects,
                                                                    Rect*               rects ) ;
    public    void                      update_rect               ( int32               x,
                                                                    int32               y,
                                                                    uint32              w,
                                                                    uint32              h ) ;
    public    int                       flip                      (  ) ;
    public    int                       set_colors                ( Color*              colors,
                                                                    int                 firstcolor,
                                                                    int                 ncolors ) ;
    public    int                       set_palette               ( int                 flags,
                                                                    Color*              colors,
                                                                    int                 firstcolor,
                                                                    int                 ncolors ) ;
    public    int                       do_lock                   (  ) ;
    public    void                      unlock                    (  ) ;
    public    int                       save                      ( RWops               dst,
                                                                    int                 freedst = ÿ% ) ;
    public    int                       set_colorkey              ( uint32              flag,
                                                                    uint32              key ) ;
    public    int                       set_alpha                 ( uint32              flag,
                                                                    uchar               alpha ) ;
    public    bool                      set_cliprect              ( Rect?               rect ) ;
    public    void                      get_cliprect              ( Rect                rect ) ;
    public    Surface?                  convert                   ( PixelFormat?        fmt,
                                                                    uint32              flags ) ;
    public    int                       blit                      ( Rect?               srcrect,
                                                                    Surface             dst,
                                                                    Rect?               dstrect ) ;
    public    int                       fill                      ( Rect?               dst,
                                                                    uint32              color ) ;
}

Surface Description

Details

Constructor Details

Surface.RGB ()
    public                              Surface.RGB               ( uint32              flags,
                                                                    int                 width,
                                                                    int                 height,
                                                                    int                 depth,
                                                                    uint32              rmask,
                                                                    uint32              gmask,
                                                                    uint32              bmask,
                                                                    uint32              amask ) ;		

Surface.from_RGB ()
    public                              Surface.from_RGB          ( void**              pixels,
                                                                    int                 width,
                                                                    int                 height,
                                                                    int                 depth,
                                                                    int                 pitch,
                                                                    uint32              rmask,
                                                                    uint32              gmask,
                                                                    uint32              bmask,
                                                                    uint32              amask ) ;		

Surface.load ()
    public                              Surface.load              ( RWops               src,
                                                                    int                 freesrc = ÿ% ) ;		

Field Details

flags
    public    uint32                    flags ;		

format
    public    PixelFormat               format ;		

w
    public    int                       w ;		

h
    public    int                       h ;		

pitch
    public    uint16                    pitch ;		

pixels
    public    void**                    pixels ;		

ref_count
    public    int                       ref_count ;		

Signal Details

Property Details

Method Details

update_rects ()
    public    void                      update_rects              ( int                 numrects,
                                                                    Rect*               rects ) ;		

update_rect ()
    public    void                      update_rect               ( int32               x,
                                                                    int32               y,
                                                                    uint32              w,
                                                                    uint32              h ) ;		

flip ()
    public    int                       flip                      (  ) ;		

set_colors ()
    public    int                       set_colors                ( Color*              colors,
                                                                    int                 firstcolor,
                                                                    int                 ncolors ) ;		

set_palette ()
    public    int                       set_palette               ( int                 flags,
                                                                    Color*              colors,
                                                                    int                 firstcolor,
                                                                    int                 ncolors ) ;		

do_lock ()
    public    int                       do_lock                   (  ) ;		

unlock ()
    public    void                      unlock                    (  ) ;		

save ()
    public    int                       save                      ( RWops               dst,
                                                                    int                 freedst = ÿ% ) ;		

set_colorkey ()
    public    int                       set_colorkey              ( uint32              flag,
                                                                    uint32              key ) ;		

set_alpha ()
    public    int                       set_alpha                 ( uint32              flag,
                                                                    uchar               alpha ) ;		

set_cliprect ()
    public    bool                      set_cliprect              ( Rect?               rect ) ;		

get_cliprect ()
    public    void                      get_cliprect              ( Rect                rect ) ;		

convert ()
    public    Surface?                  convert                   ( PixelFormat?        fmt,
                                                                    uint32              flags ) ;		

blit ()
    public    int                       blit                      ( Rect?               srcrect,
                                                                    Surface             dst,
                                                                    Rect?               dstrect ) ;		

fill ()
    public    int                       fill                      ( Rect?               dst,
                                                                    uint32              color ) ;		


Created by Valadoc