28 #ifndef SDL_surface_h_ 29 #define SDL_surface_h_ 52 #define SDL_SWSURFACE 0 53 #define SDL_PREALLOC 0x00000001 54 #define SDL_RLEACCEL 0x00000002 55 #define SDL_DONTFREE 0x00000004 56 #define SDL_SIMD_ALIGNED 0x00000008 62 #define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0) 89 struct SDL_BlitMap *
map;
131 (Uint32 flags,
int width,
int height,
int depth,
132 Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
135 extern DECLSPEC
SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat
136 (Uint32 flags,
int width,
int height,
int depth, Uint32 format);
138 extern DECLSPEC
SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(
void *pixels,
147 extern DECLSPEC
SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom
148 (
void *pixels,
int width,
int height,
int depth,
int pitch, Uint32 format);
149 extern DECLSPEC
void SDLCALL SDL_FreeSurface(
SDL_Surface * surface);
201 #define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1) 224 #define SDL_SaveBMP(surface, file) \ 225 SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1) 250 int flag, Uint32 key);
285 Uint8 r, Uint8 g, Uint8 b);
301 Uint8 * r, Uint8 * g,
398 extern DECLSPEC
SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat
399 (
SDL_Surface * src, Uint32 pixel_format, Uint32 flags);
408 const void * src,
int src_pitch,
410 void * dst,
int dst_pitch);
424 extern DECLSPEC
int SDLCALL SDL_FillRects
484 #define SDL_BlitSurface SDL_UpperBlit 513 #define SDL_BlitScaled SDL_UpperBlitScaled Definition: SDL_surface.h:106
DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops *src, int freesrc)
int pitch
Definition: SDL_surface.h:75
void * lock_data
Definition: SDL_surface.h:83
int(SDLCALL * SDL_blit)(struct SDL_Surface *src, SDL_Rect *srcrect, struct SDL_Surface *dst, SDL_Rect *dstrect)
The type of function used for surface blitting functions.
Definition: SDL_surface.h:98
Definition: SDL_surface.h:107
DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface(SDL_Surface *src, const SDL_PixelFormat *fmt, Uint32 flags)
DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode *blendMode)
Get the blend mode used for blit operations.
DECLSPEC int SDLCALL SDL_FillRect(SDL_Surface *dst, const SDL_Rect *rect, Uint32 color)
DECLSPEC SDL_bool SDLCALL SDL_HasColorKey(SDL_Surface *surface)
Returns whether the surface has a color key.
DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height, Uint32 src_format, const void *src, int src_pitch, Uint32 dst_format, void *dst, int dst_pitch)
Copy a block of pixels of one format to another format.
DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface *surface, SDL_Palette *palette)
Set the palette used by a surface.
DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface *surface, Uint8 *r, Uint8 *g, Uint8 *b)
Get the additional color value used in blit operations.
DECLSPEC void SDLCALL SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode)
Set the YUV conversion mode.
DECLSPEC int SDLCALL SDL_LowerBlitScaled(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect)
int refcount
Definition: SDL_surface.h:92
int locked
Definition: SDL_surface.h:82
Definition: SDL_surface.h:109
Definition: SDL_pixels.h:304
A rectangle, with the origin at the upper left (integer).
Definition: SDL_rect.h:77
Uint32 flags
Definition: SDL_surface.h:72
DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect)
Perform a fast, low quality, stretch blit between two surfaces of the same pixel format.
DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionModeForResolution(int width, int height)
Get the YUV conversion mode, returning the correct mode for the resolution when the current conversio...
DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface *surface)
A collection of pixels used in software blitting.
Definition: SDL_surface.h:70
void * userdata
Definition: SDL_surface.h:79
DECLSPEC int SDLCALL SDL_LowerBlit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect)
SDL_YUV_CONVERSION_MODE
The formula used for converting between YUV and RGB.
Definition: SDL_surface.h:104
DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface *surface, const SDL_Rect *rect)
void * pixels
Definition: SDL_surface.h:76
int h
Definition: SDL_surface.h:74
DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode blendMode)
Set the blend mode used for blit operations.
SDL_PixelFormat * format
Definition: SDL_surface.h:73
Definition: SDL_surface.h:108
DECLSPEC int SDLCALL SDL_UpperBlit(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect)
DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface *surface, Uint8 *alpha)
Get the additional alpha value used in blit operations.
DECLSPEC int SDLCALL SDL_UpperBlitScaled(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect)
SDL_Rect clip_rect
Definition: SDL_surface.h:86
DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface *surface)
Sets up a surface for directly accessing the pixels.
SDL_BlendMode
The blend mode used in SDL_RenderCopy() and drawing operations.
Definition: SDL_blendmode.h:40
struct SDL_Surface SDL_Surface
A collection of pixels used in software blitting.
DECLSPEC int SDLCALL SDL_SaveBMP_RW(SDL_Surface *surface, SDL_RWops *dst, int freedst)
DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface *surface, Uint32 *key)
Gets the color key (transparent pixel) in a blittable surface.
DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface *surface, int flag)
Sets the RLE acceleration hint for a surface.
DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface(Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionMode(void)
Get the YUV conversion mode.
struct SDL_BlitMap * map
Definition: SDL_surface.h:89
DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface *surface, SDL_Rect *rect)
Definition: SDL_rwops.h:52
DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface *surface, Uint8 alpha)
Set an additional alpha value used in blit operations.
DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface *surface, int flag, Uint32 key)
Sets the color key (transparent pixel) in a blittable surface.
DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b)
Set an additional color value used in blit operations.