include/SDL_surface.h
changeset 2275 12ea0fdc0df2
child 2807 365fe1a2aad5
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/include/SDL_surface.h	Mon Sep 10 12:20:02 2007 +0000
     1.3 @@ -0,0 +1,488 @@
     1.4 +/*
     1.5 +    SDL - Simple DirectMedia Layer
     1.6 +    Copyright (C) 1997-2006 Sam Lantinga
     1.7 +
     1.8 +    This library is free software; you can redistribute it and/or
     1.9 +    modify it under the terms of the GNU Lesser General Public
    1.10 +    License as published by the Free Software Foundation; either
    1.11 +    version 2.1 of the License, or (at your option) any later version.
    1.12 +
    1.13 +    This library is distributed in the hope that it will be useful,
    1.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.16 +    Lesser General Public License for more details.
    1.17 +
    1.18 +    You should have received a copy of the GNU Lesser General Public
    1.19 +    License along with this library; if not, write to the Free Software
    1.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    1.21 +
    1.22 +    Sam Lantinga
    1.23 +    slouken@libsdl.org
    1.24 +*/
    1.25 +
    1.26 +/**
    1.27 + * \file SDL_surface.h
    1.28 + *
    1.29 + * Header file for SDL_surface definition and management functions
    1.30 + */
    1.31 +
    1.32 +#ifndef _SDL_surface_h
    1.33 +#define _SDL_surface_h
    1.34 +
    1.35 +#include "SDL_stdinc.h"
    1.36 +#include "SDL_pixels.h"
    1.37 +#include "SDL_rect.h"
    1.38 +#include "SDL_rwops.h"
    1.39 +
    1.40 +#include "begin_code.h"
    1.41 +/* Set up for C function definitions, even when using C++ */
    1.42 +#ifdef __cplusplus
    1.43 +/* *INDENT-OFF* */
    1.44 +extern "C" {
    1.45 +/* *INDENT-ON* */
    1.46 +#endif
    1.47 +
    1.48 +/* These are the currently supported flags for the SDL_surface */
    1.49 +/* Used internally (read-only) */
    1.50 +#define SDL_PREALLOC        0x00000001  /* Surface uses preallocated memory */
    1.51 +#define SDL_RLEACCEL        0x00000002  /* Surface is RLE encoded */
    1.52 +
    1.53 +/* Evaluates to true if the surface needs to be locked before access */
    1.54 +#define SDL_MUSTLOCK(S)	(((S)->flags & SDL_RLEACCEL) != 0)
    1.55 +
    1.56 +/**
    1.57 + * \struct SDL_Surface
    1.58 + *
    1.59 + * \brief A collection of pixels used in software blitting
    1.60 + *
    1.61 + * \note  This structure should be treated as read-only, except for 'pixels',
    1.62 + *        which, if not NULL, contains the raw pixel data for the surface.
    1.63 + */
    1.64 +typedef struct SDL_Surface
    1.65 +{
    1.66 +    Uint32 flags;               /**< Read-only */
    1.67 +    SDL_PixelFormat *format;    /**< Read-only */
    1.68 +    int w, h;                   /**< Read-only */
    1.69 +    int pitch;                  /**< Read-only */
    1.70 +    void *pixels;               /**< Read-write */
    1.71 +
    1.72 +    /* Application data associated with the surfade */
    1.73 +    void *userdata;             /**< Read-write */
    1.74 +
    1.75 +    /* information needed for surfaces requiring locks */
    1.76 +    int locked;                 /**< Read-only */
    1.77 +    void *lock_data;            /**< Read-only */
    1.78 +
    1.79 +    /* clipping information */
    1.80 +    SDL_Rect clip_rect;         /**< Read-only */
    1.81 +
    1.82 +    /* info for fast blit mapping to other surfaces */
    1.83 +    struct SDL_BlitMap *map;    /**< Private */
    1.84 +
    1.85 +    /* format version, bumped at every change to invalidate blit maps */
    1.86 +    unsigned int format_version;        /**< Private */
    1.87 +
    1.88 +    /* Reference count -- used when freeing surface */
    1.89 +    int refcount;               /**< Read-mostly */
    1.90 +} SDL_Surface;
    1.91 +
    1.92 +/**
    1.93 + * \typedef SDL_blit
    1.94 + *
    1.95 + * \brief The type of function used for surface blitting functions
    1.96 + */
    1.97 +typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
    1.98 +                         struct SDL_Surface * dst, SDL_Rect * dstrect);
    1.99 +
   1.100 +/*
   1.101 + * Allocate and free an RGB surface (must be called after SDL_SetVideoMode)
   1.102 + * If the depth is 4 or 8 bits, an empty palette is allocated for the surface.
   1.103 + * If the depth is greater than 8 bits, the pixel format is set using the
   1.104 + * flags '[RGB]mask'.
   1.105 + * If the function runs out of memory, it will return NULL.
   1.106 + *
   1.107 + * The 'flags' tell what kind of surface to create.
   1.108 + * SDL_SRCCOLORKEY indicates that the surface will be used for colorkey blits.
   1.109 + * SDL_SRCALPHA means that the surface will be used for alpha blits.
   1.110 + */
   1.111 +extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
   1.112 +    (Uint32 flags, int width, int height, int depth,
   1.113 +     Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
   1.114 +extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
   1.115 +                                                              int width,
   1.116 +                                                              int height,
   1.117 +                                                              int depth,
   1.118 +                                                              int pitch,
   1.119 +                                                              Uint32 Rmask,
   1.120 +                                                              Uint32 Gmask,
   1.121 +                                                              Uint32 Bmask,
   1.122 +                                                              Uint32 Amask);
   1.123 +extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
   1.124 +
   1.125 +/**
   1.126 + * \fn int SDL_SetSurfacePalette(SDL_Surface *surface, SDL_Palette *palette)
   1.127 + *
   1.128 + * \brief Set the palette used by a surface.
   1.129 + *
   1.130 + * \return 0, or -1 if the surface format doesn't use a palette.
   1.131 + *
   1.132 + * \note A single palette can be shared with many surfaces.
   1.133 + */
   1.134 +extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface,
   1.135 +                                                  SDL_Palette * palette);
   1.136 +
   1.137 +/*
   1.138 + * SDL_LockSurface() sets up a surface for directly accessing the pixels.
   1.139 + * Between calls to SDL_LockSurface()/SDL_UnlockSurface(), you can write
   1.140 + * to and read from 'surface->pixels', using the pixel format stored in 
   1.141 + * 'surface->format'.  Once you are done accessing the surface, you should 
   1.142 + * use SDL_UnlockSurface() to release it.
   1.143 + *
   1.144 + * Not all surfaces require locking.  If SDL_MUSTLOCK(surface) evaluates
   1.145 + * to 0, then you can read and write to the surface at any time, and the
   1.146 + * pixel format of the surface will not change.
   1.147 + * 
   1.148 + * No operating system or library calls should be made between lock/unlock
   1.149 + * pairs, as critical system locks may be held during this time.
   1.150 + *
   1.151 + * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked.
   1.152 + */
   1.153 +extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface);
   1.154 +extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface);
   1.155 +
   1.156 +/*
   1.157 + * Load a surface from a seekable SDL data source (memory or file.)
   1.158 + * If 'freesrc' is non-zero, the source will be closed after being read.
   1.159 + * Returns the new surface, or NULL if there was an error.
   1.160 + * The new surface should be freed with SDL_FreeSurface().
   1.161 + */
   1.162 +extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
   1.163 +                                                    int freesrc);
   1.164 +
   1.165 +/* Convenience macro -- load a surface from a file */
   1.166 +#define SDL_LoadBMP(file)	SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
   1.167 +
   1.168 +/*
   1.169 + * Save a surface to a seekable SDL data source (memory or file.)
   1.170 + * If 'freedst' is non-zero, the source will be closed after being written.
   1.171 + * Returns 0 if successful or -1 if there was an error.
   1.172 + */
   1.173 +extern DECLSPEC int SDLCALL SDL_SaveBMP_RW
   1.174 +    (SDL_Surface * surface, SDL_RWops * dst, int freedst);
   1.175 +
   1.176 +/* Convenience macro -- save a surface to a file */
   1.177 +#define SDL_SaveBMP(surface, file) \
   1.178 +		SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1)
   1.179 +
   1.180 +/*
   1.181 + * \fn int SDL_SetSurfaceRLE(SDL_Surface *surface, int flag)
   1.182 + *
   1.183 + * \brief Sets the RLE acceleration hint for a surface.
   1.184 + *
   1.185 + * \return 0 on success, or -1 if the surface is not valid
   1.186 + *
   1.187 + * \note If RLE is enabled, colorkey and alpha blending blits are much faster,
   1.188 + *       but the surface must be locked before directly accessing the pixels.
   1.189 + */
   1.190 +extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface,
   1.191 +                                              int flag);
   1.192 +
   1.193 +/*
   1.194 + * \fn int SDL_SetColorKey(SDL_Surface *surface, Uint32 flag, Uint32 key)
   1.195 + *
   1.196 + * \brief Sets the color key (transparent pixel) in a blittable surface.
   1.197 + *
   1.198 + * \param surface The surface to update
   1.199 + * \param flag Non-zero to enable colorkey and 0 to disable colorkey 
   1.200 + * \param key The transparent pixel in the native surface format
   1.201 + *
   1.202 + * \return 0 on success, or -1 if the surface is not valid
   1.203 + */
   1.204 +extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,
   1.205 +                                            Uint32 flag, Uint32 key);
   1.206 +
   1.207 +/**
   1.208 + * \fn int SDL_SetSurfaceColorMod(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b)
   1.209 + *
   1.210 + * \brief Set an additional color value used in blit operations
   1.211 + *
   1.212 + * \param surface The surface to update
   1.213 + * \param r The red source color value multiplied into blit operations
   1.214 + * \param g The green source color value multiplied into blit operations
   1.215 + * \param b The blue source color value multiplied into blit operations
   1.216 + *
   1.217 + * \return 0 on success, or -1 if the surface is not valid
   1.218 + *
   1.219 + * \sa SDL_GetSurfaceColorMod()
   1.220 + */
   1.221 +extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface,
   1.222 +                                                   Uint8 r, Uint8 g, Uint8 b);
   1.223 +
   1.224 +
   1.225 +/**
   1.226 + * \fn int SDL_GetSurfaceColorMod(SDL_Surface *surface, Uint8 *r, Uint8 *g, Uint8 *b)
   1.227 + *
   1.228 + * \brief Get the additional color value used in blit operations
   1.229 + *
   1.230 + * \param surface The surface to query
   1.231 + * \param r A pointer filled in with the source red color value
   1.232 + * \param g A pointer filled in with the source green color value
   1.233 + * \param b A pointer filled in with the source blue color value
   1.234 + *
   1.235 + * \return 0 on success, or -1 if the surface is not valid
   1.236 + *
   1.237 + * \sa SDL_SetSurfaceColorMod()
   1.238 + */
   1.239 +extern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface,
   1.240 +                                                   Uint8 * r, Uint8 * g,
   1.241 +                                                   Uint8 * b);
   1.242 +
   1.243 +/**
   1.244 + * \fn int SDL_SetSurfaceAlphaMod(SDL_Surface *surface, Uint8 alpha)
   1.245 + *
   1.246 + * \brief Set an additional alpha value used in blit operations
   1.247 + *
   1.248 + * \param surface The surface to update
   1.249 + * \param alpha The source alpha value multiplied into blit operations.
   1.250 + *
   1.251 + * \return 0 on success, or -1 if the surface is not valid
   1.252 + *
   1.253 + * \sa SDL_GetSurfaceAlphaMod()
   1.254 + */
   1.255 +extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface,
   1.256 +                                                   Uint8 alpha);
   1.257 +
   1.258 +/**
   1.259 + * \fn int SDL_GetSurfaceAlphaMod(SDL_Surface *surface, Uint8 *alpha)
   1.260 + *
   1.261 + * \brief Get the additional alpha value used in blit operations
   1.262 + *
   1.263 + * \param surface The surface to query
   1.264 + * \param alpha A pointer filled in with the source alpha value
   1.265 + *
   1.266 + * \return 0 on success, or -1 if the surface is not valid
   1.267 + *
   1.268 + * \sa SDL_SetSurfaceAlphaMod()
   1.269 + */
   1.270 +extern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface,
   1.271 +                                                   Uint8 * alpha);
   1.272 +
   1.273 +/**
   1.274 + * \fn int SDL_SetSurfaceBlendMode(SDL_Surface *surface, int blendMode)
   1.275 + *
   1.276 + * \brief Set the blend mode used for blit operations
   1.277 + *
   1.278 + * \param surface The surface to update
   1.279 + * \param blendMode SDL_TextureBlendMode to use for blit blending
   1.280 + *
   1.281 + * \return 0 on success, or -1 if the parameters are not valid
   1.282 + *
   1.283 + * \sa SDL_GetSurfaceBlendMode()
   1.284 + */
   1.285 +extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface,
   1.286 +                                                    int blendMode);
   1.287 +
   1.288 +/**
   1.289 + * \fn int SDL_GetSurfaceBlendMode(SDL_Surface *surface, int *blendMode)
   1.290 + *
   1.291 + * \brief Get the blend mode used for blit operations
   1.292 + *
   1.293 + * \param surface The surface to query
   1.294 + * \param blendMode A pointer filled in with the current blend mode
   1.295 + *
   1.296 + * \return 0 on success, or -1 if the surface is not valid
   1.297 + *
   1.298 + * \sa SDL_SetSurfaceBlendMode()
   1.299 + */
   1.300 +extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface,
   1.301 +                                                    int *blendMode);
   1.302 +
   1.303 +/**
   1.304 + * \fn int SDL_SetSurfaceScaleMode(SDL_Surface *surface, int scaleMode)
   1.305 + *
   1.306 + * \brief Set the scale mode used for blit operations
   1.307 + *
   1.308 + * \param surface The surface to update
   1.309 + * \param scaleMode SDL_TextureScaleMode to use for blit scaling
   1.310 + *
   1.311 + * \return 0 on success, or -1 if the surface is not valid or the scale mode is not supported
   1.312 + *
   1.313 + * \note If the scale mode is not supported, the closest supported mode is chosen.  Currently only SDL_TEXTURESCALEMODE_FAST is supported on surfaces.
   1.314 + *
   1.315 + * \sa SDL_GetSurfaceScaleMode()
   1.316 + */
   1.317 +extern DECLSPEC int SDLCALL SDL_SetSurfaceScaleMode(SDL_Surface * surface,
   1.318 +                                                    int scaleMode);
   1.319 +
   1.320 +/**
   1.321 + * \fn int SDL_GetSurfaceScaleMode(SDL_Surface *surface, int *scaleMode)
   1.322 + *
   1.323 + * \brief Get the scale mode used for blit operations
   1.324 + *
   1.325 + * \param surface The surface to query
   1.326 + * \param scaleMode A pointer filled in with the current scale mode
   1.327 + *
   1.328 + * \return 0 on success, or -1 if the surface is not valid
   1.329 + *
   1.330 + * \sa SDL_SetSurfaceScaleMode()
   1.331 + */
   1.332 +extern DECLSPEC int SDLCALL SDL_GetSurfaceScaleMode(SDL_Surface * surface,
   1.333 +                                                    int *scaleMode);
   1.334 +
   1.335 +/*
   1.336 + * Sets the clipping rectangle for the destination surface in a blit.
   1.337 + *
   1.338 + * If the clip rectangle is NULL, clipping will be disabled.
   1.339 + * If the clip rectangle doesn't intersect the surface, the function will
   1.340 + * return SDL_FALSE and blits will be completely clipped.  Otherwise the
   1.341 + * function returns SDL_TRUE and blits to the surface will be clipped to
   1.342 + * the intersection of the surface area and the clipping rectangle.
   1.343 + *
   1.344 + * Note that blits are automatically clipped to the edges of the source
   1.345 + * and destination surfaces.
   1.346 + */
   1.347 +extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface,
   1.348 +                                                 const SDL_Rect * rect);
   1.349 +
   1.350 +/*
   1.351 + * Gets the clipping rectangle for the destination surface in a blit.
   1.352 + * 'rect' must be a pointer to a valid rectangle which will be filled
   1.353 + * with the correct values.
   1.354 + */
   1.355 +extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface,
   1.356 +                                             SDL_Rect * rect);
   1.357 +
   1.358 +/*
   1.359 + * Creates a new surface of the specified format, and then copies and maps 
   1.360 + * the given surface to it so the blit of the converted surface will be as 
   1.361 + * fast as possible.  If this function fails, it returns NULL.
   1.362 + *
   1.363 + * The 'flags' parameter is passed to SDL_CreateRGBSurface() and has those 
   1.364 + * semantics.  You can also pass SDL_RLEACCEL in the flags parameter and
   1.365 + * SDL will try to RLE accelerate colorkey and alpha blits in the resulting
   1.366 + * surface.
   1.367 + *
   1.368 + * This function is used internally by SDL_DisplayFormat().
   1.369 + */
   1.370 +extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
   1.371 +    (SDL_Surface * src, SDL_PixelFormat * fmt, Uint32 flags);
   1.372 +
   1.373 +/*
   1.374 + * This function performs a fast fill of the given rectangle with 'color'
   1.375 + * The given rectangle is clipped to the destination surface clip area
   1.376 + * and the final fill rectangle is saved in the passed in pointer.
   1.377 + * If 'dstrect' is NULL, the whole surface will be filled with 'color'
   1.378 + * The color should be a pixel of the format used by the surface, and 
   1.379 + * can be generated by the SDL_MapRGB() function.
   1.380 + * This function returns 0 on success, or -1 on error.
   1.381 + */
   1.382 +extern DECLSPEC int SDLCALL SDL_FillRect
   1.383 +    (SDL_Surface * dst, SDL_Rect * dstrect, Uint32 color);
   1.384 +
   1.385 +/*
   1.386 + * This performs a fast blit from the source surface to the destination
   1.387 + * surface.  It assumes that the source and destination rectangles are
   1.388 + * the same size.  If either 'srcrect' or 'dstrect' are NULL, the entire
   1.389 + * surface (src or dst) is copied.  The final blit rectangles are saved
   1.390 + * in 'srcrect' and 'dstrect' after all clipping is performed.
   1.391 + * If the blit is successful, it returns 0, otherwise it returns -1.
   1.392 + *
   1.393 + * The blit function should not be called on a locked surface.
   1.394 + *
   1.395 + * The blit semantics for surfaces with and without alpha and colorkey
   1.396 + * are defined as follows:
   1.397 + *
   1.398 + * RGBA->RGB:
   1.399 + *     SDL_SRCALPHA set:
   1.400 + * 	alpha-blend (using alpha-channel).
   1.401 + * 	SDL_SRCCOLORKEY ignored.
   1.402 + *     SDL_SRCALPHA not set:
   1.403 + * 	copy RGB.
   1.404 + * 	if SDL_SRCCOLORKEY set, only copy the pixels matching the
   1.405 + * 	RGB values of the source colour key, ignoring alpha in the
   1.406 + * 	comparison.
   1.407 + * 
   1.408 + * RGB->RGBA:
   1.409 + *     SDL_SRCALPHA set:
   1.410 + * 	alpha-blend (using the source per-surface alpha value);
   1.411 + * 	set destination alpha to opaque.
   1.412 + *     SDL_SRCALPHA not set:
   1.413 + * 	copy RGB, set destination alpha to source per-surface alpha value.
   1.414 + *     both:
   1.415 + * 	if SDL_SRCCOLORKEY set, only copy the pixels matching the
   1.416 + * 	source colour key.
   1.417 + * 
   1.418 + * RGBA->RGBA:
   1.419 + *     SDL_SRCALPHA set:
   1.420 + * 	alpha-blend (using the source alpha channel) the RGB values;
   1.421 + * 	leave destination alpha untouched. [Note: is this correct?]
   1.422 + * 	SDL_SRCCOLORKEY ignored.
   1.423 + *     SDL_SRCALPHA not set:
   1.424 + * 	copy all of RGBA to the destination.
   1.425 + * 	if SDL_SRCCOLORKEY set, only copy the pixels matching the
   1.426 + * 	RGB values of the source colour key, ignoring alpha in the
   1.427 + * 	comparison.
   1.428 + * 
   1.429 + * RGB->RGB: 
   1.430 + *     SDL_SRCALPHA set:
   1.431 + * 	alpha-blend (using the source per-surface alpha value).
   1.432 + *     SDL_SRCALPHA not set:
   1.433 + * 	copy RGB.
   1.434 + *     both:
   1.435 + * 	if SDL_SRCCOLORKEY set, only copy the pixels matching the
   1.436 + * 	source colour key.
   1.437 + *
   1.438 + * If either of the surfaces were in video memory, and the blit returns -2,
   1.439 + * the video memory was lost, so it should be reloaded with artwork and 
   1.440 + * re-blitted:
   1.441 +	while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) {
   1.442 +		while ( SDL_LockSurface(image) < 0 )
   1.443 +			Sleep(10);
   1.444 +		-- Write image pixels to image->pixels --
   1.445 +		SDL_UnlockSurface(image);
   1.446 +	}
   1.447 + * This happens under DirectX 5.0 when the system switches away from your
   1.448 + * fullscreen application.  The lock will also fail until you have access
   1.449 + * to the video memory again.
   1.450 + */
   1.451 +/* You should call SDL_BlitSurface() unless you know exactly how SDL
   1.452 +   blitting works internally and how to use the other blit functions.
   1.453 +*/
   1.454 +#define SDL_BlitSurface SDL_UpperBlit
   1.455 +
   1.456 +/* This is the public blit function, SDL_BlitSurface(), and it performs
   1.457 +   rectangle validation and clipping before passing it to SDL_LowerBlit()
   1.458 +*/
   1.459 +extern DECLSPEC int SDLCALL SDL_UpperBlit
   1.460 +    (SDL_Surface * src, SDL_Rect * srcrect,
   1.461 +     SDL_Surface * dst, SDL_Rect * dstrect);
   1.462 +/* This is a semi-private blit function and it performs low-level surface
   1.463 +   blitting only.
   1.464 +*/
   1.465 +extern DECLSPEC int SDLCALL SDL_LowerBlit
   1.466 +    (SDL_Surface * src, SDL_Rect * srcrect,
   1.467 +     SDL_Surface * dst, SDL_Rect * dstrect);
   1.468 +
   1.469 +/**
   1.470 + * \fn int SDL_SoftStretch(SDL_Surface * src, SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect)
   1.471 + *
   1.472 + * \brief Perform a fast, low quality, stretch blit between two surfaces of the same pixel format.
   1.473 + *
   1.474 + * \note This function uses a static buffer, and is not thread-safe.
   1.475 + */
   1.476 +extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,
   1.477 +                                            SDL_Rect * srcrect,
   1.478 +                                            SDL_Surface * dst,
   1.479 +                                            SDL_Rect * dstrect);
   1.480 +
   1.481 +/* Ends C function definitions when using C++ */
   1.482 +#ifdef __cplusplus
   1.483 +/* *INDENT-OFF* */
   1.484 +}
   1.485 +/* *INDENT-ON* */
   1.486 +#endif
   1.487 +#include "close_code.h"
   1.488 +
   1.489 +#endif /* _SDL_surface_h */
   1.490 +
   1.491 +/* vi: set ts=4 sw=4 expandtab: */