author | Ryan C. Gordon <icculus@icculus.org> |
Sun, 28 Aug 2016 13:36:13 -0400 | |
changeset 10286 | 3b884985835c |
parent 9998 | f67cf37e9cd4 |
permissions | -rw-r--r-- |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1 |
/* |
5535
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5499
diff
changeset
|
2 |
Simple DirectMedia Layer |
9998
f67cf37e9cd4
Updated copyright to 2016
Sam Lantinga <slouken@libsdl.org>
parents:
9619
diff
changeset
|
3 |
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org> |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
4 |
|
5535
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5499
diff
changeset
|
5 |
This software is provided 'as-is', without any express or implied |
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5499
diff
changeset
|
6 |
warranty. In no event will the authors be held liable for any damages |
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5499
diff
changeset
|
7 |
arising from the use of this software. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
8 |
|
5535
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5499
diff
changeset
|
9 |
Permission is granted to anyone to use this software for any purpose, |
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5499
diff
changeset
|
10 |
including commercial applications, and to alter it and redistribute it |
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5499
diff
changeset
|
11 |
freely, subject to the following restrictions: |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
12 |
|
5535
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5499
diff
changeset
|
13 |
1. The origin of this software must not be misrepresented; you must not |
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5499
diff
changeset
|
14 |
claim that you wrote the original software. If you use this software |
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5499
diff
changeset
|
15 |
in a product, an acknowledgment in the product documentation would be |
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5499
diff
changeset
|
16 |
appreciated but is not required. |
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5499
diff
changeset
|
17 |
2. Altered source versions must be plainly marked as such, and must not be |
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5499
diff
changeset
|
18 |
misrepresented as being the original software. |
96594ac5fd1a
SDL 1.3 is now under the zlib license.
Sam Lantinga <slouken@libsdl.org>
parents:
5499
diff
changeset
|
19 |
3. This notice may not be removed or altered from any source distribution. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
20 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
21 |
|
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
22 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
23 |
* \file SDL_surface.h |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
24 |
* |
7278
fc8b57a2a541
Fixed doxygen warnings and corrected documentation in header files.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents:
7191
diff
changeset
|
25 |
* Header file for ::SDL_Surface definition and management functions. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
26 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
27 |
|
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
28 |
#ifndef _SDL_surface_h |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
29 |
#define _SDL_surface_h |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
30 |
|
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
31 |
#include "SDL_stdinc.h" |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
32 |
#include "SDL_pixels.h" |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
33 |
#include "SDL_rect.h" |
4929
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
4424
diff
changeset
|
34 |
#include "SDL_blendmode.h" |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
35 |
#include "SDL_rwops.h" |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
36 |
|
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
37 |
#include "begin_code.h" |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
38 |
/* Set up for C function definitions, even when using C++ */ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
39 |
#ifdef __cplusplus |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
40 |
extern "C" { |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
41 |
#endif |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
42 |
|
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
43 |
/** |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
44 |
* \name Surface flags |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
45 |
* |
7278
fc8b57a2a541
Fixed doxygen warnings and corrected documentation in header files.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents:
7191
diff
changeset
|
46 |
* These are the currently supported flags for the ::SDL_Surface. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
47 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
48 |
* \internal |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
49 |
* Used internally (read-only). |
3341 | 50 |
*/ |
7678
286c42d7c5ed
OCD fixes: Adds a space after /* (glory to regular expressions!)
Gabriel Jacobo <gabomdq@gmail.com>
parents:
7677
diff
changeset
|
51 |
/* @{ */ |
6257
4b6e961362fb
Re-added SDL_SWSURFACE, because it looks silly to always pass 0 to SDL_CreateRGBSurface()
Sam Lantinga <slouken@libsdl.org>
parents:
6138
diff
changeset
|
52 |
#define SDL_SWSURFACE 0 /**< Just here for compatibility */ |
3341 | 53 |
#define SDL_PREALLOC 0x00000001 /**< Surface uses preallocated memory */ |
54 |
#define SDL_RLEACCEL 0x00000002 /**< Surface is RLE encoded */ |
|
5288 | 55 |
#define SDL_DONTFREE 0x00000004 /**< Surface is referenced internally */ |
7678
286c42d7c5ed
OCD fixes: Adds a space after /* (glory to regular expressions!)
Gabriel Jacobo <gabomdq@gmail.com>
parents:
7677
diff
changeset
|
56 |
/* @} *//* Surface flags */ |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
57 |
|
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
58 |
/** |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
59 |
* Evaluates to true if the surface needs to be locked before access. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
60 |
*/ |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
61 |
#define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0) |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
62 |
|
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
63 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
64 |
* \brief A collection of pixels used in software blitting. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
65 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
66 |
* \note This structure should be treated as read-only, except for \c pixels, |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
67 |
* which, if not NULL, contains the raw pixel data for the surface. |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
68 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
69 |
typedef struct SDL_Surface |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
70 |
{ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
71 |
Uint32 flags; /**< Read-only */ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
72 |
SDL_PixelFormat *format; /**< Read-only */ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
73 |
int w, h; /**< Read-only */ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
74 |
int pitch; /**< Read-only */ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
75 |
void *pixels; /**< Read-write */ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
76 |
|
3708
d3f7cf8b0db0
Fixed typo in the comment
Sam Lantinga <slouken@libsdl.org>
parents:
3697
diff
changeset
|
77 |
/** Application data associated with the surface */ |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
78 |
void *userdata; /**< Read-write */ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
79 |
|
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
80 |
/** information needed for surfaces requiring locks */ |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
81 |
int locked; /**< Read-only */ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
82 |
void *lock_data; /**< Read-only */ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
83 |
|
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
84 |
/** clipping information */ |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
85 |
SDL_Rect clip_rect; /**< Read-only */ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
86 |
|
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
87 |
/** info for fast blit mapping to other surfaces */ |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
88 |
struct SDL_BlitMap *map; /**< Private */ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
89 |
|
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
90 |
/** Reference count -- used when freeing surface */ |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
91 |
int refcount; /**< Read-mostly */ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
92 |
} SDL_Surface; |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
93 |
|
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
94 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
95 |
* \brief The type of function used for surface blitting functions. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
96 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
97 |
typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
98 |
struct SDL_Surface * dst, SDL_Rect * dstrect); |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
99 |
|
3341 | 100 |
/** |
4424
274743af0430
Removed reference to compatibility function
Sam Lantinga <slouken@libsdl.org>
parents:
3709
diff
changeset
|
101 |
* Allocate and free an RGB surface. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
102 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
103 |
* If the depth is 4 or 8 bits, an empty palette is allocated for the surface. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
104 |
* If the depth is greater than 8 bits, the pixel format is set using the |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
105 |
* flags '[RGB]mask'. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
106 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
107 |
* If the function runs out of memory, it will return NULL. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
108 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
109 |
* \param flags The \c flags are obsolete and should be set to 0. |
7188
20bd120bf7e4
Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents:
7125
diff
changeset
|
110 |
* \param width The width in pixels of the surface to create. |
20bd120bf7e4
Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents:
7125
diff
changeset
|
111 |
* \param height The height in pixels of the surface to create. |
20bd120bf7e4
Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents:
7125
diff
changeset
|
112 |
* \param depth The depth in bits of the surface to create. |
20bd120bf7e4
Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents:
7125
diff
changeset
|
113 |
* \param Rmask The red mask of the surface to create. |
20bd120bf7e4
Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents:
7125
diff
changeset
|
114 |
* \param Gmask The green mask of the surface to create. |
20bd120bf7e4
Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents:
7125
diff
changeset
|
115 |
* \param Bmask The blue mask of the surface to create. |
20bd120bf7e4
Fixed Doxygen warnings.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents:
7125
diff
changeset
|
116 |
* \param Amask The alpha mask of the surface to create. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
117 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
118 |
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
119 |
(Uint32 flags, int width, int height, int depth, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
120 |
Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask); |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
121 |
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
122 |
int width, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
123 |
int height, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
124 |
int depth, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
125 |
int pitch, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
126 |
Uint32 Rmask, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
127 |
Uint32 Gmask, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
128 |
Uint32 Bmask, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
129 |
Uint32 Amask); |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
130 |
extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface); |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
131 |
|
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
132 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
133 |
* \brief Set the palette used by a surface. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
134 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
135 |
* \return 0, or -1 if the surface format doesn't use a palette. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
136 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
137 |
* \note A single palette can be shared with many surfaces. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
138 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
139 |
extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
140 |
SDL_Palette * palette); |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
141 |
|
3341 | 142 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
143 |
* \brief Sets up a surface for directly accessing the pixels. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
144 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
145 |
* Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
146 |
* to and read from \c surface->pixels, using the pixel format stored in |
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
147 |
* \c surface->format. Once you are done accessing the surface, you should |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
148 |
* use SDL_UnlockSurface() to release it. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
149 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
150 |
* Not all surfaces require locking. If SDL_MUSTLOCK(surface) evaluates |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
151 |
* to 0, then you can read and write to the surface at any time, and the |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
152 |
* pixel format of the surface will not change. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
153 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
154 |
* No operating system or library calls should be made between lock/unlock |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
155 |
* pairs, as critical system locks may be held during this time. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
156 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
157 |
* SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
158 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
159 |
* \sa SDL_UnlockSurface() |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
160 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
161 |
extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface); |
3341 | 162 |
/** \sa SDL_LockSurface() */ |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
163 |
extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface); |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
164 |
|
3341 | 165 |
/** |
4971
158bb5752974
Updated headers to match wiki documentation
Sam Lantinga <slouken@libsdl.org>
parents:
4949
diff
changeset
|
166 |
* Load a surface from a seekable SDL data stream (memory or file). |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
167 |
* |
4971
158bb5752974
Updated headers to match wiki documentation
Sam Lantinga <slouken@libsdl.org>
parents:
4949
diff
changeset
|
168 |
* If \c freesrc is non-zero, the stream will be closed after being read. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
169 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
170 |
* The new surface should be freed with SDL_FreeSurface(). |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
171 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
172 |
* \return the new surface, or NULL if there was an error. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
173 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
174 |
extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
175 |
int freesrc); |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
176 |
|
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
177 |
/** |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
178 |
* Load a surface from a file. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
179 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
180 |
* Convenience macro. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
181 |
*/ |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
182 |
#define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1) |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
183 |
|
3341 | 184 |
/** |
4971
158bb5752974
Updated headers to match wiki documentation
Sam Lantinga <slouken@libsdl.org>
parents:
4949
diff
changeset
|
185 |
* Save a surface to a seekable SDL data stream (memory or file). |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
186 |
* |
4971
158bb5752974
Updated headers to match wiki documentation
Sam Lantinga <slouken@libsdl.org>
parents:
4949
diff
changeset
|
187 |
* If \c freedst is non-zero, the stream will be closed after being written. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
188 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
189 |
* \return 0 if successful or -1 if there was an error. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
190 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
191 |
extern DECLSPEC int SDLCALL SDL_SaveBMP_RW |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
192 |
(SDL_Surface * surface, SDL_RWops * dst, int freedst); |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
193 |
|
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
194 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
195 |
* Save a surface to a file. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
196 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
197 |
* Convenience macro. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
198 |
*/ |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
199 |
#define SDL_SaveBMP(surface, file) \ |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
200 |
SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1) |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
201 |
|
3341 | 202 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
203 |
* \brief Sets the RLE acceleration hint for a surface. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
204 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
205 |
* \return 0 on success, or -1 if the surface is not valid |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
206 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
207 |
* \note If RLE is enabled, colorkey and alpha blending blits are much faster, |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
208 |
* but the surface must be locked before directly accessing the pixels. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
209 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
210 |
extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
211 |
int flag); |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
212 |
|
3341 | 213 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
214 |
* \brief Sets the color key (transparent pixel) in a blittable surface. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
215 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
216 |
* \param surface The surface to update |
6257
4b6e961362fb
Re-added SDL_SWSURFACE, because it looks silly to always pass 0 to SDL_CreateRGBSurface()
Sam Lantinga <slouken@libsdl.org>
parents:
6138
diff
changeset
|
217 |
* \param flag Non-zero to enable colorkey and 0 to disable colorkey |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
218 |
* \param key The transparent pixel in the native surface format |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
219 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
220 |
* \return 0 on success, or -1 if the surface is not valid |
6257
4b6e961362fb
Re-added SDL_SWSURFACE, because it looks silly to always pass 0 to SDL_CreateRGBSurface()
Sam Lantinga <slouken@libsdl.org>
parents:
6138
diff
changeset
|
221 |
* |
4b6e961362fb
Re-added SDL_SWSURFACE, because it looks silly to always pass 0 to SDL_CreateRGBSurface()
Sam Lantinga <slouken@libsdl.org>
parents:
6138
diff
changeset
|
222 |
* You can pass SDL_RLEACCEL to enable RLE accelerated blits. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
223 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
224 |
extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface, |
3560
5543db4239e6
The SDL 1.3 tests have been cleaned up not to include any 1.2 compatibility code.
Sam Lantinga <slouken@libsdl.org>
parents:
3550
diff
changeset
|
225 |
int flag, Uint32 key); |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
226 |
|
3341 | 227 |
/** |
3550 | 228 |
* \brief Gets the color key (transparent pixel) in a blittable surface. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
229 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
230 |
* \param surface The surface to update |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
231 |
* \param key A pointer filled in with the transparent pixel in the native |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
232 |
* surface format |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
233 |
* |
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
234 |
* \return 0 on success, or -1 if the surface is not valid or colorkey is not |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
235 |
* enabled. |
3103 | 236 |
*/ |
237 |
extern DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface * surface, |
|
238 |
Uint32 * key); |
|
239 |
||
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
240 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
241 |
* \brief Set an additional color value used in blit operations. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
242 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
243 |
* \param surface The surface to update. |
4971
158bb5752974
Updated headers to match wiki documentation
Sam Lantinga <slouken@libsdl.org>
parents:
4949
diff
changeset
|
244 |
* \param r The red color value multiplied into blit operations. |
158bb5752974
Updated headers to match wiki documentation
Sam Lantinga <slouken@libsdl.org>
parents:
4949
diff
changeset
|
245 |
* \param g The green color value multiplied into blit operations. |
158bb5752974
Updated headers to match wiki documentation
Sam Lantinga <slouken@libsdl.org>
parents:
4949
diff
changeset
|
246 |
* \param b The blue color value multiplied into blit operations. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
247 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
248 |
* \return 0 on success, or -1 if the surface is not valid. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
249 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
250 |
* \sa SDL_GetSurfaceColorMod() |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
251 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
252 |
extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
253 |
Uint8 r, Uint8 g, Uint8 b); |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
254 |
|
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
255 |
|
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
256 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
257 |
* \brief Get the additional color value used in blit operations. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
258 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
259 |
* \param surface The surface to query. |
4971
158bb5752974
Updated headers to match wiki documentation
Sam Lantinga <slouken@libsdl.org>
parents:
4949
diff
changeset
|
260 |
* \param r A pointer filled in with the current red color value. |
158bb5752974
Updated headers to match wiki documentation
Sam Lantinga <slouken@libsdl.org>
parents:
4949
diff
changeset
|
261 |
* \param g A pointer filled in with the current green color value. |
158bb5752974
Updated headers to match wiki documentation
Sam Lantinga <slouken@libsdl.org>
parents:
4949
diff
changeset
|
262 |
* \param b A pointer filled in with the current blue color value. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
263 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
264 |
* \return 0 on success, or -1 if the surface is not valid. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
265 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
266 |
* \sa SDL_SetSurfaceColorMod() |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
267 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
268 |
extern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
269 |
Uint8 * r, Uint8 * g, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
270 |
Uint8 * b); |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
271 |
|
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
272 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
273 |
* \brief Set an additional alpha value used in blit operations. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
274 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
275 |
* \param surface The surface to update. |
4971
158bb5752974
Updated headers to match wiki documentation
Sam Lantinga <slouken@libsdl.org>
parents:
4949
diff
changeset
|
276 |
* \param alpha The alpha value multiplied into blit operations. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
277 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
278 |
* \return 0 on success, or -1 if the surface is not valid. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
279 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
280 |
* \sa SDL_GetSurfaceAlphaMod() |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
281 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
282 |
extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
283 |
Uint8 alpha); |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
284 |
|
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
285 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
286 |
* \brief Get the additional alpha value used in blit operations. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
287 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
288 |
* \param surface The surface to query. |
4971
158bb5752974
Updated headers to match wiki documentation
Sam Lantinga <slouken@libsdl.org>
parents:
4949
diff
changeset
|
289 |
* \param alpha A pointer filled in with the current alpha value. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
290 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
291 |
* \return 0 on success, or -1 if the surface is not valid. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
292 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
293 |
* \sa SDL_SetSurfaceAlphaMod() |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
294 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
295 |
extern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
296 |
Uint8 * alpha); |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
297 |
|
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
298 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
299 |
* \brief Set the blend mode used for blit operations. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
300 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
301 |
* \param surface The surface to update. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
302 |
* \param blendMode ::SDL_BlendMode to use for blit blending. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
303 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
304 |
* \return 0 on success, or -1 if the parameters are not valid. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
305 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
306 |
* \sa SDL_GetSurfaceBlendMode() |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
307 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
308 |
extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface, |
4929
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
4424
diff
changeset
|
309 |
SDL_BlendMode blendMode); |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
310 |
|
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
311 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
312 |
* \brief Get the blend mode used for blit operations. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
313 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
314 |
* \param surface The surface to query. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
315 |
* \param blendMode A pointer filled in with the current blend mode. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
316 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
317 |
* \return 0 on success, or -1 if the surface is not valid. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
318 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
319 |
* \sa SDL_SetSurfaceBlendMode() |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
320 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
321 |
extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface, |
4929
aa8888658021
Use the enumerated type for blend and scale mode instead of int
Sam Lantinga <slouken@libsdl.org>
parents:
4424
diff
changeset
|
322 |
SDL_BlendMode *blendMode); |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
323 |
|
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
324 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
325 |
* Sets the clipping rectangle for the destination surface in a blit. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
326 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
327 |
* If the clip rectangle is NULL, clipping will be disabled. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
328 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
329 |
* If the clip rectangle doesn't intersect the surface, the function will |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
330 |
* return SDL_FALSE and blits will be completely clipped. Otherwise the |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
331 |
* function returns SDL_TRUE and blits to the surface will be clipped to |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
332 |
* the intersection of the surface area and the clipping rectangle. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
333 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
334 |
* Note that blits are automatically clipped to the edges of the source |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
335 |
* and destination surfaces. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
336 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
337 |
extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
338 |
const SDL_Rect * rect); |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
339 |
|
3341 | 340 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
341 |
* Gets the clipping rectangle for the destination surface in a blit. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
342 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
343 |
* \c rect must be a pointer to a valid rectangle which will be filled |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
344 |
* with the correct values. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
345 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
346 |
extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
347 |
SDL_Rect * rect); |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
348 |
|
3341 | 349 |
/** |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
350 |
* Creates a new surface of the specified format, and then copies and maps |
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
351 |
* the given surface to it so the blit of the converted surface will be as |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
352 |
* fast as possible. If this function fails, it returns NULL. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
353 |
* |
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
354 |
* The \c flags parameter is passed to SDL_CreateRGBSurface() and has those |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
355 |
* semantics. You can also pass ::SDL_RLEACCEL in the flags parameter and |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
356 |
* SDL will try to RLE accelerate colorkey and alpha blits in the resulting |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
357 |
* surface. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
358 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
359 |
extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface |
7725
c61ab95113fe
The SDL_PixelFormat* passed to SDL_ConvertSurface() should be const.
Ryan C. Gordon <icculus@icculus.org>
parents:
7678
diff
changeset
|
360 |
(SDL_Surface * src, const SDL_PixelFormat * fmt, Uint32 flags); |
5375
16877f74123c
Implemented Cocoa_SetWindowIcon(), added SDL_ConvertSurfaceFormat()
Sam Lantinga <slouken@libsdl.org>
parents:
5297
diff
changeset
|
361 |
extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat |
16877f74123c
Implemented Cocoa_SetWindowIcon(), added SDL_ConvertSurfaceFormat()
Sam Lantinga <slouken@libsdl.org>
parents:
5297
diff
changeset
|
362 |
(SDL_Surface * src, Uint32 pixel_format, Uint32 flags); |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
363 |
|
3341 | 364 |
/** |
3434
147d6ef5be03
Added a utility function to convert blocks of pixels
Sam Lantinga <slouken@libsdl.org>
parents:
3407
diff
changeset
|
365 |
* \brief Copy a block of pixels of one format to another format |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
366 |
* |
6041
69d7539ff51f
SDL_ConvertPixels() returns 0 on success
Sam Lantinga <slouken@libsdl.org>
parents:
5535
diff
changeset
|
367 |
* \return 0 on success, or -1 if there was an error |
3434
147d6ef5be03
Added a utility function to convert blocks of pixels
Sam Lantinga <slouken@libsdl.org>
parents:
3407
diff
changeset
|
368 |
*/ |
147d6ef5be03
Added a utility function to convert blocks of pixels
Sam Lantinga <slouken@libsdl.org>
parents:
3407
diff
changeset
|
369 |
extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height, |
147d6ef5be03
Added a utility function to convert blocks of pixels
Sam Lantinga <slouken@libsdl.org>
parents:
3407
diff
changeset
|
370 |
Uint32 src_format, |
147d6ef5be03
Added a utility function to convert blocks of pixels
Sam Lantinga <slouken@libsdl.org>
parents:
3407
diff
changeset
|
371 |
const void * src, int src_pitch, |
147d6ef5be03
Added a utility function to convert blocks of pixels
Sam Lantinga <slouken@libsdl.org>
parents:
3407
diff
changeset
|
372 |
Uint32 dst_format, |
147d6ef5be03
Added a utility function to convert blocks of pixels
Sam Lantinga <slouken@libsdl.org>
parents:
3407
diff
changeset
|
373 |
void * dst, int dst_pitch); |
147d6ef5be03
Added a utility function to convert blocks of pixels
Sam Lantinga <slouken@libsdl.org>
parents:
3407
diff
changeset
|
374 |
|
147d6ef5be03
Added a utility function to convert blocks of pixels
Sam Lantinga <slouken@libsdl.org>
parents:
3407
diff
changeset
|
375 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
376 |
* Performs a fast fill of the given rectangle with \c color. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
377 |
* |
3536
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3434
diff
changeset
|
378 |
* If \c rect is NULL, the whole surface will be filled with \c color. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
379 |
* |
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
380 |
* The color should be a pixel of the format used by the surface, and |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
381 |
* can be generated by the SDL_MapRGB() function. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
382 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
383 |
* \return 0 on success, or -1 on error. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
384 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
385 |
extern DECLSPEC int SDLCALL SDL_FillRect |
3536
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3434
diff
changeset
|
386 |
(SDL_Surface * dst, const SDL_Rect * rect, Uint32 color); |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3434
diff
changeset
|
387 |
extern DECLSPEC int SDLCALL SDL_FillRects |
5297
1800dc39b74c
Changed the concept of a render clip rect to a render viewport.
Sam Lantinga <slouken@libsdl.org>
parents:
5296
diff
changeset
|
388 |
(SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color); |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
389 |
|
3341 | 390 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
391 |
* Performs a fast blit from the source surface to the destination surface. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
392 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
393 |
* This assumes that the source and destination rectangles are |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
394 |
* the same size. If either \c srcrect or \c dstrect are NULL, the entire |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
395 |
* surface (\c src or \c dst) is copied. The final blit rectangles are saved |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
396 |
* in \c srcrect and \c dstrect after all clipping is performed. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
397 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
398 |
* \return If the blit is successful, it returns 0, otherwise it returns -1. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
399 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
400 |
* The blit function should not be called on a locked surface. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
401 |
* |
7502
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7278
diff
changeset
|
402 |
* The blit semantics for surfaces with and without blending and colorkey |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
403 |
* are defined as follows: |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
404 |
* \verbatim |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
405 |
RGBA->RGB: |
7502
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7278
diff
changeset
|
406 |
Source surface blend mode set to SDL_BLENDMODE_BLEND: |
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7278
diff
changeset
|
407 |
alpha-blend (using the source alpha-channel and per-surface alpha) |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
408 |
SDL_SRCCOLORKEY ignored. |
7502
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7278
diff
changeset
|
409 |
Source surface blend mode set to SDL_BLENDMODE_NONE: |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
410 |
copy RGB. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
411 |
if SDL_SRCCOLORKEY set, only copy the pixels matching the |
7125
082c0c53ac16
Corrected spelling in header files.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents:
6885
diff
changeset
|
412 |
RGB values of the source color key, ignoring alpha in the |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
413 |
comparison. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
414 |
|
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
415 |
RGB->RGBA: |
7502
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7278
diff
changeset
|
416 |
Source surface blend mode set to SDL_BLENDMODE_BLEND: |
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7278
diff
changeset
|
417 |
alpha-blend (using the source per-surface alpha) |
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7278
diff
changeset
|
418 |
Source surface blend mode set to SDL_BLENDMODE_NONE: |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
419 |
copy RGB, set destination alpha to source per-surface alpha value. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
420 |
both: |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
421 |
if SDL_SRCCOLORKEY set, only copy the pixels matching the |
7125
082c0c53ac16
Corrected spelling in header files.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents:
6885
diff
changeset
|
422 |
source color key. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
423 |
|
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
424 |
RGBA->RGBA: |
7502
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7278
diff
changeset
|
425 |
Source surface blend mode set to SDL_BLENDMODE_BLEND: |
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7278
diff
changeset
|
426 |
alpha-blend (using the source alpha-channel and per-surface alpha) |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
427 |
SDL_SRCCOLORKEY ignored. |
7502
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7278
diff
changeset
|
428 |
Source surface blend mode set to SDL_BLENDMODE_NONE: |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
429 |
copy all of RGBA to the destination. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
430 |
if SDL_SRCCOLORKEY set, only copy the pixels matching the |
7125
082c0c53ac16
Corrected spelling in header files.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents:
6885
diff
changeset
|
431 |
RGB values of the source color key, ignoring alpha in the |
7502
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7278
diff
changeset
|
432 |
comparison. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
433 |
|
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
434 |
RGB->RGB: |
7502
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7278
diff
changeset
|
435 |
Source surface blend mode set to SDL_BLENDMODE_BLEND: |
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7278
diff
changeset
|
436 |
alpha-blend (using the source per-surface alpha) |
6ff02ff3cf06
Updated blend semantics so blending uses the following formula:
Sam Lantinga <slouken@libsdl.org>
parents:
7278
diff
changeset
|
437 |
Source surface blend mode set to SDL_BLENDMODE_NONE: |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
438 |
copy RGB. |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
439 |
both: |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
440 |
if SDL_SRCCOLORKEY set, only copy the pixels matching the |
7125
082c0c53ac16
Corrected spelling in header files.
Philipp Wiesemann <philipp.wiesemann@arcor.de>
parents:
6885
diff
changeset
|
441 |
source color key. |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
442 |
\endverbatim |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
443 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
444 |
* You should call SDL_BlitSurface() unless you know exactly how SDL |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
445 |
* blitting works internally and how to use the other blit functions. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
446 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
447 |
#define SDL_BlitSurface SDL_UpperBlit |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
448 |
|
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
449 |
/** |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
450 |
* This is the public blit function, SDL_BlitSurface(), and it performs |
3341 | 451 |
* rectangle validation and clipping before passing it to SDL_LowerBlit() |
452 |
*/ |
|
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
453 |
extern DECLSPEC int SDLCALL SDL_UpperBlit |
4949
68da5a234bba
The source rectangle isn't modified in SDL_UpperBlit
Sam Lantinga <slouken@libsdl.org>
parents:
4929
diff
changeset
|
454 |
(SDL_Surface * src, const SDL_Rect * srcrect, |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
455 |
SDL_Surface * dst, SDL_Rect * dstrect); |
3341 | 456 |
|
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
457 |
/** |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
458 |
* This is a semi-private blit function and it performs low-level surface |
3341 | 459 |
* blitting only. |
460 |
*/ |
|
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
461 |
extern DECLSPEC int SDLCALL SDL_LowerBlit |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
462 |
(SDL_Surface * src, SDL_Rect * srcrect, |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
463 |
SDL_Surface * dst, SDL_Rect * dstrect); |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
464 |
|
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
465 |
/** |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
466 |
* \brief Perform a fast, low quality, stretch blit between two surfaces of the |
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
467 |
* same pixel format. |
7191
75360622e65f
File style cleanup for the SDL 2.0 release
Sam Lantinga <slouken@libsdl.org>
parents:
7188
diff
changeset
|
468 |
* |
3407
d3baf5ac4e37
Partial fix for bug #859
Sam Lantinga <slouken@libsdl.org>
parents:
3341
diff
changeset
|
469 |
* \note This function uses a static buffer, and is not thread-safe. |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
470 |
*/ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
471 |
extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src, |
2828
7e5ff6cd05bf
Added very slow software scaling to the X11 renderer
Sam Lantinga <slouken@libsdl.org>
parents:
2807
diff
changeset
|
472 |
const SDL_Rect * srcrect, |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
473 |
SDL_Surface * dst, |
2828
7e5ff6cd05bf
Added very slow software scaling to the X11 renderer
Sam Lantinga <slouken@libsdl.org>
parents:
2807
diff
changeset
|
474 |
const SDL_Rect * dstrect); |
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
475 |
|
5499
2b8e6d1e3817
Split SDL_BlitScaled into SDL_UpperBlitScaled and SDL_LowerBlitScaled.
Ken Rogoway <ken@rogoway.com>
parents:
5375
diff
changeset
|
476 |
#define SDL_BlitScaled SDL_UpperBlitScaled |
2b8e6d1e3817
Split SDL_BlitScaled into SDL_UpperBlitScaled and SDL_LowerBlitScaled.
Ken Rogoway <ken@rogoway.com>
parents:
5375
diff
changeset
|
477 |
|
5296
48067bfc300c
Software scaling support. Not very fast, but it seems to work.
Ken Rogoway <ken@rogoway.com>
parents:
5292
diff
changeset
|
478 |
/** |
5499
2b8e6d1e3817
Split SDL_BlitScaled into SDL_UpperBlitScaled and SDL_LowerBlitScaled.
Ken Rogoway <ken@rogoway.com>
parents:
5375
diff
changeset
|
479 |
* This is the public scaled blit function, SDL_BlitScaled(), and it performs |
2b8e6d1e3817
Split SDL_BlitScaled into SDL_UpperBlitScaled and SDL_LowerBlitScaled.
Ken Rogoway <ken@rogoway.com>
parents:
5375
diff
changeset
|
480 |
* rectangle validation and clipping before passing it to SDL_LowerBlitScaled() |
5296
48067bfc300c
Software scaling support. Not very fast, but it seems to work.
Ken Rogoway <ken@rogoway.com>
parents:
5292
diff
changeset
|
481 |
*/ |
5499
2b8e6d1e3817
Split SDL_BlitScaled into SDL_UpperBlitScaled and SDL_LowerBlitScaled.
Ken Rogoway <ken@rogoway.com>
parents:
5375
diff
changeset
|
482 |
extern DECLSPEC int SDLCALL SDL_UpperBlitScaled |
5296
48067bfc300c
Software scaling support. Not very fast, but it seems to work.
Ken Rogoway <ken@rogoway.com>
parents:
5292
diff
changeset
|
483 |
(SDL_Surface * src, const SDL_Rect * srcrect, |
5499
2b8e6d1e3817
Split SDL_BlitScaled into SDL_UpperBlitScaled and SDL_LowerBlitScaled.
Ken Rogoway <ken@rogoway.com>
parents:
5375
diff
changeset
|
484 |
SDL_Surface * dst, SDL_Rect * dstrect); |
2b8e6d1e3817
Split SDL_BlitScaled into SDL_UpperBlitScaled and SDL_LowerBlitScaled.
Ken Rogoway <ken@rogoway.com>
parents:
5375
diff
changeset
|
485 |
|
2b8e6d1e3817
Split SDL_BlitScaled into SDL_UpperBlitScaled and SDL_LowerBlitScaled.
Ken Rogoway <ken@rogoway.com>
parents:
5375
diff
changeset
|
486 |
/** |
2b8e6d1e3817
Split SDL_BlitScaled into SDL_UpperBlitScaled and SDL_LowerBlitScaled.
Ken Rogoway <ken@rogoway.com>
parents:
5375
diff
changeset
|
487 |
* This is a semi-private blit function and it performs low-level surface |
2b8e6d1e3817
Split SDL_BlitScaled into SDL_UpperBlitScaled and SDL_LowerBlitScaled.
Ken Rogoway <ken@rogoway.com>
parents:
5375
diff
changeset
|
488 |
* scaled blitting only. |
2b8e6d1e3817
Split SDL_BlitScaled into SDL_UpperBlitScaled and SDL_LowerBlitScaled.
Ken Rogoway <ken@rogoway.com>
parents:
5375
diff
changeset
|
489 |
*/ |
2b8e6d1e3817
Split SDL_BlitScaled into SDL_UpperBlitScaled and SDL_LowerBlitScaled.
Ken Rogoway <ken@rogoway.com>
parents:
5375
diff
changeset
|
490 |
extern DECLSPEC int SDLCALL SDL_LowerBlitScaled |
2b8e6d1e3817
Split SDL_BlitScaled into SDL_UpperBlitScaled and SDL_LowerBlitScaled.
Ken Rogoway <ken@rogoway.com>
parents:
5375
diff
changeset
|
491 |
(SDL_Surface * src, SDL_Rect * srcrect, |
2b8e6d1e3817
Split SDL_BlitScaled into SDL_UpperBlitScaled and SDL_LowerBlitScaled.
Ken Rogoway <ken@rogoway.com>
parents:
5375
diff
changeset
|
492 |
SDL_Surface * dst, SDL_Rect * dstrect); |
5296
48067bfc300c
Software scaling support. Not very fast, but it seems to work.
Ken Rogoway <ken@rogoway.com>
parents:
5292
diff
changeset
|
493 |
|
48067bfc300c
Software scaling support. Not very fast, but it seems to work.
Ken Rogoway <ken@rogoway.com>
parents:
5292
diff
changeset
|
494 |
|
2275
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
495 |
/* Ends C function definitions when using C++ */ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
496 |
#ifdef __cplusplus |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
497 |
} |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
498 |
#endif |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
499 |
#include "close_code.h" |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
500 |
|
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
501 |
#endif /* _SDL_surface_h */ |
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
502 |
|
12ea0fdc0df2
Split out the SDL_rect and SDL_surface functions into their own headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
503 |
/* vi: set ts=4 sw=4 expandtab: */ |