A collection of pixels used in software blitting.
Defined in SDL_surface.h
typedef struct SDL_Surface
{/**< Read-only */
Uint32 flags; /**< Read-only */
SDL_PixelFormat *format; int w, h; /**< Read-only */
int pitch; /**< Read-only */
void *pixels; /**< Read-write */
/** Application data associated with the surface */
void *userdata; /**< Read-write */
/** information needed for surfaces requiring locks */
int locked; /**< Read-only */
/** list of BlitMap that hold a reference to this surface */
void *list_blitmap; /**< Private */
/** clipping information */
/**< Read-only */
SDL_Rect clip_rect;
/** info for fast blit mapping to other surfaces */
/**< Private */
SDL_BlitMap *map;
/** Reference count -- used when freeing surface */
int refcount; /**< Read-mostly */
} SDL_Surface;
This structure should be treated as read-only, except for pixels
, which, if not NULL, contains the raw pixel data for the surface.