115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/* 215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Simple DirectMedia Layer 315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org> 415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot This software is provided 'as-is', without any express or implied 615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot warranty. In no event will the authors be held liable for any damages 715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot arising from the use of this software. 815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Permission is granted to anyone to use this software for any purpose, 1015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot including commercial applications, and to alter it and redistribute it 1115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot freely, subject to the following restrictions: 1215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 1315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 1. The origin of this software must not be misrepresented; you must not 1415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot claim that you wrote the original software. If you use this software 1515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot in a product, an acknowledgment in the product documentation would be 1615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot appreciated but is not required. 1715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 2. Altered source versions must be plainly marked as such, and must not be 1815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot misrepresented as being the original software. 1915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 3. This notice may not be removed or altered from any source distribution. 2015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot*/ 2115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 2215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 2315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \file SDL_surface.h 2415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 2515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * Header file for ::SDL_Surface definition and management functions. 2615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 2715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 2815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#ifndef _SDL_surface_h 2915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#define _SDL_surface_h 3015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 3115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#include "SDL_stdinc.h" 3215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#include "SDL_pixels.h" 3315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#include "SDL_rect.h" 3415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#include "SDL_blendmode.h" 3515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#include "SDL_rwops.h" 3615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 3715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#include "begin_code.h" 3815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/* Set up for C function definitions, even when using C++ */ 3915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#ifdef __cplusplus 4015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern "C" { 4115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#endif 4215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 4315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 4415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \name Surface flags 4515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 4615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * These are the currently supported flags for the ::SDL_Surface. 4715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 4815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \internal 4915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * Used internally (read-only). 5015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 5115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/* @{ */ 5215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#define SDL_SWSURFACE 0 /**< Just here for compatibility */ 5315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#define SDL_PREALLOC 0x00000001 /**< Surface uses preallocated memory */ 5415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#define SDL_RLEACCEL 0x00000002 /**< Surface is RLE encoded */ 5515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#define SDL_DONTFREE 0x00000004 /**< Surface is referenced internally */ 5615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/* @} *//* Surface flags */ 5715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 5815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 5915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * Evaluates to true if the surface needs to be locked before access. 6015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 6115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0) 6215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 6315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 6415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \brief A collection of pixels used in software blitting. 6515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 6615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \note This structure should be treated as read-only, except for \c pixels, 6715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * which, if not NULL, contains the raw pixel data for the surface. 6815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 6915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robottypedef struct SDL_Surface 7015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot{ 7115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Uint32 flags; /**< Read-only */ 7215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot SDL_PixelFormat *format; /**< Read-only */ 7315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot int w, h; /**< Read-only */ 7415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot int pitch; /**< Read-only */ 7515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot void *pixels; /**< Read-write */ 7615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 7715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot /** Application data associated with the surface */ 7815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot void *userdata; /**< Read-write */ 7915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 8015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot /** information needed for surfaces requiring locks */ 8115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot int locked; /**< Read-only */ 8215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot void *lock_data; /**< Read-only */ 8315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 8415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot /** clipping information */ 8515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot SDL_Rect clip_rect; /**< Read-only */ 8615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 8715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot /** info for fast blit mapping to other surfaces */ 8815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot struct SDL_BlitMap *map; /**< Private */ 8915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 9015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot /** Reference count -- used when freeing surface */ 9115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot int refcount; /**< Read-mostly */ 9215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot} SDL_Surface; 9315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 9415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 9515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \brief The type of function used for surface blitting functions. 9615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 9715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robottypedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect, 9815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot struct SDL_Surface * dst, SDL_Rect * dstrect); 9915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 10015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 10115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * Allocate and free an RGB surface. 10215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 10315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * If the depth is 4 or 8 bits, an empty palette is allocated for the surface. 10415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * If the depth is greater than 8 bits, the pixel format is set using the 10515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * flags '[RGB]mask'. 10615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 10715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * If the function runs out of memory, it will return NULL. 10815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 10915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param flags The \c flags are obsolete and should be set to 0. 11015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param width The width in pixels of the surface to create. 11115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param height The height in pixels of the surface to create. 11215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param depth The depth in bits of the surface to create. 11315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param Rmask The red mask of the surface to create. 11415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param Gmask The green mask of the surface to create. 11515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param Bmask The blue mask of the surface to create. 11615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param Amask The alpha mask of the surface to create. 11715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 11815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface 11915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot (Uint32 flags, int width, int height, int depth, 12015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask); 12115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels, 12215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot int width, 12315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot int height, 12415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot int depth, 12515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot int pitch, 12615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Uint32 Rmask, 12715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Uint32 Gmask, 12815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Uint32 Bmask, 12915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Uint32 Amask); 13015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface); 13115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 13215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 13315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \brief Set the palette used by a surface. 13415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 13515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \return 0, or -1 if the surface format doesn't use a palette. 13615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 13715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \note A single palette can be shared with many surfaces. 13815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 13915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface, 14015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot SDL_Palette * palette); 14115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 14215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 14315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \brief Sets up a surface for directly accessing the pixels. 14415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 14515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write 14615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * to and read from \c surface->pixels, using the pixel format stored in 14715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \c surface->format. Once you are done accessing the surface, you should 14815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * use SDL_UnlockSurface() to release it. 14915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 15015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * Not all surfaces require locking. If SDL_MUSTLOCK(surface) evaluates 15115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * to 0, then you can read and write to the surface at any time, and the 15215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * pixel format of the surface will not change. 15315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 15415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * No operating system or library calls should be made between lock/unlock 15515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * pairs, as critical system locks may be held during this time. 15615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 15715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked. 15815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 15915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \sa SDL_UnlockSurface() 16015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 16115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface); 16215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** \sa SDL_LockSurface() */ 16315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface); 16415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 16515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 16615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * Load a surface from a seekable SDL data stream (memory or file). 16715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 16815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * If \c freesrc is non-zero, the stream will be closed after being read. 16915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 17015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * The new surface should be freed with SDL_FreeSurface(). 17115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 17215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \return the new surface, or NULL if there was an error. 17315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 17415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src, 17515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot int freesrc); 17615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 17715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 17815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * Load a surface from a file. 17915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 18015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * Convenience macro. 18115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 18215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1) 18315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 18415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 18515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * Save a surface to a seekable SDL data stream (memory or file). 18615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 18715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * If \c freedst is non-zero, the stream will be closed after being written. 18815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 18915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \return 0 if successful or -1 if there was an error. 19015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 19115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_SaveBMP_RW 19215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot (SDL_Surface * surface, SDL_RWops * dst, int freedst); 19315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 19415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 19515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * Save a surface to a file. 19615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 19715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * Convenience macro. 19815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 19915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#define SDL_SaveBMP(surface, file) \ 20015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1) 20115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 20215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 20315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \brief Sets the RLE acceleration hint for a surface. 20415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 20515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \return 0 on success, or -1 if the surface is not valid 20615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 20715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \note If RLE is enabled, colorkey and alpha blending blits are much faster, 20815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * but the surface must be locked before directly accessing the pixels. 20915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 21015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface, 21115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot int flag); 21215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 21315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 21415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \brief Sets the color key (transparent pixel) in a blittable surface. 21515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 21615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param surface The surface to update 21715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param flag Non-zero to enable colorkey and 0 to disable colorkey 21815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param key The transparent pixel in the native surface format 21915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 22015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \return 0 on success, or -1 if the surface is not valid 22115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 22215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * You can pass SDL_RLEACCEL to enable RLE accelerated blits. 22315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 22415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface, 22515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot int flag, Uint32 key); 22615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 22715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 22815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \brief Gets the color key (transparent pixel) in a blittable surface. 22915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 23015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param surface The surface to update 23115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param key A pointer filled in with the transparent pixel in the native 23215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * surface format 23315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 23415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \return 0 on success, or -1 if the surface is not valid or colorkey is not 23515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * enabled. 23615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 23715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface * surface, 23815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Uint32 * key); 23915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 24015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 24115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \brief Set an additional color value used in blit operations. 24215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 24315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param surface The surface to update. 24415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param r The red color value multiplied into blit operations. 24515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param g The green color value multiplied into blit operations. 24615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param b The blue color value multiplied into blit operations. 24715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 24815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \return 0 on success, or -1 if the surface is not valid. 24915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 25015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \sa SDL_GetSurfaceColorMod() 25115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 25215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface, 25315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Uint8 r, Uint8 g, Uint8 b); 25415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 25515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 25615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 25715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \brief Get the additional color value used in blit operations. 25815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 25915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param surface The surface to query. 26015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param r A pointer filled in with the current red color value. 26115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param g A pointer filled in with the current green color value. 26215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param b A pointer filled in with the current blue color value. 26315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 26415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \return 0 on success, or -1 if the surface is not valid. 26515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 26615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \sa SDL_SetSurfaceColorMod() 26715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 26815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface, 26915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Uint8 * r, Uint8 * g, 27015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Uint8 * b); 27115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 27215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 27315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \brief Set an additional alpha value used in blit operations. 27415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 27515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param surface The surface to update. 27615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param alpha The alpha value multiplied into blit operations. 27715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 27815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \return 0 on success, or -1 if the surface is not valid. 27915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 28015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \sa SDL_GetSurfaceAlphaMod() 28115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 28215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface, 28315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Uint8 alpha); 28415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 28515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 28615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \brief Get the additional alpha value used in blit operations. 28715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 28815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param surface The surface to query. 28915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param alpha A pointer filled in with the current alpha value. 29015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 29115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \return 0 on success, or -1 if the surface is not valid. 29215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 29315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \sa SDL_SetSurfaceAlphaMod() 29415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 29515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface, 29615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Uint8 * alpha); 29715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 29815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 29915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \brief Set the blend mode used for blit operations. 30015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 30115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param surface The surface to update. 30215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param blendMode ::SDL_BlendMode to use for blit blending. 30315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 30415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \return 0 on success, or -1 if the parameters are not valid. 30515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 30615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \sa SDL_GetSurfaceBlendMode() 30715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 30815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface, 30915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot SDL_BlendMode blendMode); 31015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 31115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 31215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \brief Get the blend mode used for blit operations. 31315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 31415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param surface The surface to query. 31515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \param blendMode A pointer filled in with the current blend mode. 31615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 31715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \return 0 on success, or -1 if the surface is not valid. 31815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 31915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \sa SDL_SetSurfaceBlendMode() 32015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 32115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface, 32215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot SDL_BlendMode *blendMode); 32315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 32415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 32515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * Sets the clipping rectangle for the destination surface in a blit. 32615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 32715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * If the clip rectangle is NULL, clipping will be disabled. 32815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 32915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * If the clip rectangle doesn't intersect the surface, the function will 33015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * return SDL_FALSE and blits will be completely clipped. Otherwise the 33115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * function returns SDL_TRUE and blits to the surface will be clipped to 33215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * the intersection of the surface area and the clipping rectangle. 33315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 33415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * Note that blits are automatically clipped to the edges of the source 33515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * and destination surfaces. 33615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 33715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface, 33815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot const SDL_Rect * rect); 33915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 34015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 34115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * Gets the clipping rectangle for the destination surface in a blit. 34215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 34315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \c rect must be a pointer to a valid rectangle which will be filled 34415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * with the correct values. 34515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 34615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface, 34715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot SDL_Rect * rect); 34815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 34915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 35015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * Creates a new surface of the specified format, and then copies and maps 35115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * the given surface to it so the blit of the converted surface will be as 35215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * fast as possible. If this function fails, it returns NULL. 35315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 35415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * The \c flags parameter is passed to SDL_CreateRGBSurface() and has those 35515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * semantics. You can also pass ::SDL_RLEACCEL in the flags parameter and 35615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * SDL will try to RLE accelerate colorkey and alpha blits in the resulting 35715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * surface. 35815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 35915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface 36015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot (SDL_Surface * src, const SDL_PixelFormat * fmt, Uint32 flags); 36115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat 36215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot (SDL_Surface * src, Uint32 pixel_format, Uint32 flags); 36315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 36415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 36515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \brief Copy a block of pixels of one format to another format 36615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 36715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \return 0 on success, or -1 if there was an error 36815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 36915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height, 37015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Uint32 src_format, 37115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot const void * src, int src_pitch, 37215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Uint32 dst_format, 37315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot void * dst, int dst_pitch); 37415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 37515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 37615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * Performs a fast fill of the given rectangle with \c color. 37715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 37815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * If \c rect is NULL, the whole surface will be filled with \c color. 37915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 38015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * The color should be a pixel of the format used by the surface, and 38115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * can be generated by the SDL_MapRGB() function. 38215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 38315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \return 0 on success, or -1 on error. 38415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 38515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_FillRect 38615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot (SDL_Surface * dst, const SDL_Rect * rect, Uint32 color); 38715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_FillRects 38815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot (SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color); 38915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 39015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 39115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * Performs a fast blit from the source surface to the destination surface. 39215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 39315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * This assumes that the source and destination rectangles are 39415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * the same size. If either \c srcrect or \c dstrect are NULL, the entire 39515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * surface (\c src or \c dst) is copied. The final blit rectangles are saved 39615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * in \c srcrect and \c dstrect after all clipping is performed. 39715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 39815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \return If the blit is successful, it returns 0, otherwise it returns -1. 39915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 40015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * The blit function should not be called on a locked surface. 40115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 40215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * The blit semantics for surfaces with and without blending and colorkey 40315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * are defined as follows: 40415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \verbatim 40515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot RGBA->RGB: 40615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Source surface blend mode set to SDL_BLENDMODE_BLEND: 40715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot alpha-blend (using the source alpha-channel and per-surface alpha) 40815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot SDL_SRCCOLORKEY ignored. 40915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Source surface blend mode set to SDL_BLENDMODE_NONE: 41015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot copy RGB. 41115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot if SDL_SRCCOLORKEY set, only copy the pixels matching the 41215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot RGB values of the source color key, ignoring alpha in the 41315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot comparison. 41415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 41515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot RGB->RGBA: 41615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Source surface blend mode set to SDL_BLENDMODE_BLEND: 41715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot alpha-blend (using the source per-surface alpha) 41815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Source surface blend mode set to SDL_BLENDMODE_NONE: 41915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot copy RGB, set destination alpha to source per-surface alpha value. 42015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot both: 42115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot if SDL_SRCCOLORKEY set, only copy the pixels matching the 42215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot source color key. 42315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 42415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot RGBA->RGBA: 42515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Source surface blend mode set to SDL_BLENDMODE_BLEND: 42615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot alpha-blend (using the source alpha-channel and per-surface alpha) 42715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot SDL_SRCCOLORKEY ignored. 42815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Source surface blend mode set to SDL_BLENDMODE_NONE: 42915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot copy all of RGBA to the destination. 43015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot if SDL_SRCCOLORKEY set, only copy the pixels matching the 43115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot RGB values of the source color key, ignoring alpha in the 43215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot comparison. 43315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 43415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot RGB->RGB: 43515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Source surface blend mode set to SDL_BLENDMODE_BLEND: 43615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot alpha-blend (using the source per-surface alpha) 43715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot Source surface blend mode set to SDL_BLENDMODE_NONE: 43815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot copy RGB. 43915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot both: 44015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot if SDL_SRCCOLORKEY set, only copy the pixels matching the 44115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot source color key. 44215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot \endverbatim 44315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 44415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * You should call SDL_BlitSurface() unless you know exactly how SDL 44515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * blitting works internally and how to use the other blit functions. 44615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 44715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#define SDL_BlitSurface SDL_UpperBlit 44815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 44915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 45015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * This is the public blit function, SDL_BlitSurface(), and it performs 45115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * rectangle validation and clipping before passing it to SDL_LowerBlit() 45215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 45315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_UpperBlit 45415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot (SDL_Surface * src, const SDL_Rect * srcrect, 45515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot SDL_Surface * dst, SDL_Rect * dstrect); 45615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 45715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 45815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * This is a semi-private blit function and it performs low-level surface 45915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * blitting only. 46015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 46115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_LowerBlit 46215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot (SDL_Surface * src, SDL_Rect * srcrect, 46315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot SDL_Surface * dst, SDL_Rect * dstrect); 46415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 46515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 46615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \brief Perform a fast, low quality, stretch blit between two surfaces of the 46715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * same pixel format. 46815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * 46915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * \note This function uses a static buffer, and is not thread-safe. 47015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 47115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src, 47215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot const SDL_Rect * srcrect, 47315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot SDL_Surface * dst, 47415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot const SDL_Rect * dstrect); 47515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 47615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#define SDL_BlitScaled SDL_UpperBlitScaled 47715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 47815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 47915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * This is the public scaled blit function, SDL_BlitScaled(), and it performs 48015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * rectangle validation and clipping before passing it to SDL_LowerBlitScaled() 48115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 48215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_UpperBlitScaled 48315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot (SDL_Surface * src, const SDL_Rect * srcrect, 48415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot SDL_Surface * dst, SDL_Rect * dstrect); 48515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 48615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/** 48715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * This is a semi-private blit function and it performs low-level surface 48815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot * scaled blitting only. 48915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot */ 49015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robotextern DECLSPEC int SDLCALL SDL_LowerBlitScaled 49115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot (SDL_Surface * src, SDL_Rect * srcrect, 49215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot SDL_Surface * dst, SDL_Rect * dstrect); 49315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 49415560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 49515560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/* Ends C function definitions when using C++ */ 49615560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#ifdef __cplusplus 49715560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot} 49815560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#endif 49915560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#include "close_code.h" 50015560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 50115560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot#endif /* _SDL_surface_h */ 50215560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot 50315560bb32cdb9b47db48eb4865b736df9708a8fandroid-build-team Robot/* vi: set ts=4 sw=4 expandtab: */ 504