SDL
2.0
|
#include "../SDL_internal.h"
#include "SDL_video.h"
#include "SDL_sysvideo.h"
#include "SDL_blit.h"
#include "SDL_RLEaccel_c.h"
#include "SDL_pixels_c.h"
Go to the source code of this file.
Macros | |
#define | CLAMP(val) ((val) > 0 ? ((val) < 255 ? (val) : 255) : 0) |
#define | MAKE_Y(r, g, b) (int)( 0.29900f * (r) + 0.58700f * (g) + 0.11400f * (b)) |
#define | MAKE_U(r, g, b) (int)(-0.16874f * (r) - 0.33126f * (g) + 0.50000f * (b) + 128) |
#define | MAKE_V(r, g, b) (int)( 0.50000f * (r) - 0.41869f * (g) - 0.08131f * (b) + 128) |
#define | MAKE_R(y, u, v) CLAMP((int)((y) + 1.40200f * ((v) - 128))) |
#define | MAKE_G(y, u, v) CLAMP((int)((y) - 0.34414f * ((u) - 128) - 0.71414f * ((v) - 128))) |
#define | MAKE_B(y, u, v) CLAMP((int)((y) + 1.77200f * ((u) - 128) )) |
#define | WRITE_RGB_PIXEL(y, u, v) |
#define | READ_PACKED_YUV(var1, var2, var3, var4) |
#define | READ_2x2_PIXELS |
#define | READ_2x1_PIXELS |
#define | READ_1x2_PIXELS |
#define | READ_1x1_PIXEL |
#define | READ_TWO_RGB_PIXELS |
#define | READ_ONE_RGB_PIXEL |
Definition at line 1327 of file SDL_surface.c.
Definition at line 1338 of file SDL_surface.c.
Definition at line 1337 of file SDL_surface.c.
Definition at line 1336 of file SDL_surface.c.
Definition at line 1333 of file SDL_surface.c.
Referenced by SDL_ConvertPixels_ARGB8888_to_YUV().
Definition at line 1334 of file SDL_surface.c.
Referenced by SDL_ConvertPixels_ARGB8888_to_YUV().
Definition at line 1332 of file SDL_surface.c.
Referenced by SDL_ConvertPixels_ARGB8888_to_YUV().
#define READ_1x1_PIXEL |
Referenced by SDL_ConvertPixels_ARGB8888_to_YUV().
#define READ_1x2_PIXELS |
Referenced by SDL_ConvertPixels_ARGB8888_to_YUV().
#define READ_2x1_PIXELS |
Referenced by SDL_ConvertPixels_ARGB8888_to_YUV().
#define READ_2x2_PIXELS |
Referenced by SDL_ConvertPixels_ARGB8888_to_YUV().
#define READ_ONE_RGB_PIXEL |
Referenced by SDL_ConvertPixels_ARGB8888_to_YUV().
#define READ_PACKED_YUV | ( | var1, | |
var2, | |||
var3, | |||
var4 | |||
) |
Referenced by SDL_ConvertPixels_YUV_to_ARGB8888().
#define READ_TWO_RGB_PIXELS |
Referenced by SDL_ConvertPixels_ARGB8888_to_YUV().
Referenced by SDL_ConvertPixels_YUV_to_ARGB8888().
SDL_COMPILE_TIME_ASSERT | ( | surface_size_assumptions | , |
sizeof(int) | = =sizeof(Sint32) &&sizeof(size_t) >=sizeof(Sint32) |
||
) |
|
static |
Definition at line 299 of file SDL_surface.c.
References SDL_PixelFormat::Amask, SDL_PixelFormat::BytesPerPixel, SDL_BlitInfo::colorkey, SDL_BlitInfo::flags, SDL_Surface::format, SDL_Surface::h, SDL_BlitMap::info, SDL_Surface::map, SDL_Surface::pitch, SDL_Surface::pixels, SDL_BLENDMODE_BLEND, SDL_COPY_COLORKEY, SDL_LockSurface(), SDL_SetColorKey(), SDL_SetSurfaceBlendMode(), SDL_UnlockSurface(), and SDL_Surface::w.
Referenced by SDL_ConvertSurface().
int SDL_ConvertPixels | ( | int | width, |
int | height, | ||
Uint32 | src_format, | ||
const void * | src, | ||
int | src_pitch, | ||
Uint32 | dst_format, | ||
void * | dst, | ||
int | dst_pitch | ||
) |
Copy a block of pixels of one format to another format.
Definition at line 1123 of file SDL_surface.c.
References SDL_Rect::h, i, NULL, rect, SDL_BYTESPERPIXEL, SDL_ConvertPixels_ARGB8888_to_YUV(), SDL_ConvertPixels_YUV_to_ARGB8888(), SDL_CreateSurfaceOnStack(), SDL_free, SDL_InvalidParamError, SDL_ISPIXELFORMAT_FOURCC, SDL_LowerBlit(), SDL_malloc, SDL_memcpy, SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_IYUV, SDL_PIXELFORMAT_NV12, SDL_PIXELFORMAT_NV21, SDL_PIXELFORMAT_UYVY, SDL_PIXELFORMAT_YUY2, SDL_PIXELFORMAT_YV12, SDL_PIXELFORMAT_YVYU, SDL_SetError, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
|
static |
Definition at line 1537 of file SDL_surface.c.
References G, i, j, MAKE_U, MAKE_V, MAKE_Y, READ_1x1_PIXEL, READ_1x2_PIXELS, READ_2x1_PIXELS, READ_2x2_PIXELS, READ_ONE_RGB_PIXEL, READ_TWO_RGB_PIXELS, SDL_PIXELFORMAT_IYUV, SDL_PIXELFORMAT_NV12, SDL_PIXELFORMAT_NV21, SDL_PIXELFORMAT_UYVY, SDL_PIXELFORMAT_YUY2, SDL_PIXELFORMAT_YV12, and SDL_PIXELFORMAT_YVYU.
Referenced by SDL_ConvertPixels().
|
static |
Definition at line 1355 of file SDL_surface.c.
References i, j, READ_PACKED_YUV, SDL_PIXELFORMAT_IYUV, SDL_PIXELFORMAT_NV12, SDL_PIXELFORMAT_NV21, SDL_PIXELFORMAT_UYVY, SDL_PIXELFORMAT_YUY2, SDL_PIXELFORMAT_YV12, SDL_PIXELFORMAT_YVYU, void, and WRITE_RGB_PIXEL.
Referenced by SDL_ConvertPixels().
SDL_Surface* SDL_ConvertSurface | ( | SDL_Surface * | src, |
const SDL_PixelFormat * | fmt, | ||
Uint32 | flags | ||
) |
Creates a new surface of the specified format, and then copies and maps the given surface to it so the blit of the converted surface will be as fast as possible. If this function fails, it returns NULL.
The flags
parameter is passed to SDL_CreateRGBSurface() and has those semantics. You can also pass SDL_RLEACCEL in the flags parameter and SDL will try to RLE accelerate colorkey and alpha blits in the resulting surface.
Definition at line 910 of file SDL_surface.c.
References SDL_BlitInfo::a, SDL_Color::a, SDL_PixelFormat::Amask, SDL_BlitInfo::b, SDL_Color::b, SDL_PixelFormat::BitsPerPixel, SDL_PixelFormat::Bmask, SDL_PixelFormat::BytesPerPixel, SDL_Surface::clip_rect, SDL_BlitInfo::colorkey, SDL_Palette::colors, SDL_BlitInfo::flags, SDL_Surface::format, SDL_BlitInfo::g, SDL_Color::g, SDL_PixelFormat::Gmask, SDL_Rect::h, SDL_Surface::h, i, SDL_BlitMap::info, SDL_Surface::map, SDL_Palette::ncolors, NULL, SDL_PixelFormat::palette, SDL_Surface::pixels, SDL_BlitInfo::r, SDL_Color::r, SDL_PixelFormat::Rmask, SDL_BLENDMODE_BLEND, SDL_ConvertColorkeyToAlpha(), SDL_COPY_BLEND, SDL_COPY_COLORKEY, SDL_COPY_MODULATE_ALPHA, SDL_COPY_RLE_ALPHAKEY, SDL_COPY_RLE_COLORKEY, SDL_COPY_RLE_DESIRED, SDL_CreateRGBSurface(), SDL_FALSE, SDL_FillRect, SDL_FreeSurface(), SDL_InvalidateMap(), SDL_InvalidParamError, SDL_LowerBlit(), SDL_memcmp, SDL_memcpy, SDL_RLEACCEL, SDL_SetClipRect(), SDL_SetColorKey(), SDL_SetError, SDL_SetSurfaceBlendMode(), SDL_SetSurfacePalette(), SDL_SetSurfaceRLE(), SDL_TRUE, SDL_Rect::w, SDL_Surface::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by SDL_ConvertSurfaceFormat(), and SDL_DuplicateSurface().
SDL_Surface* SDL_ConvertSurfaceFormat | ( | SDL_Surface * | surface, |
Uint32 | pixel_format, | ||
Uint32 | flags | ||
) |
Definition at line 1067 of file SDL_surface.c.
References NULL, SDL_AllocFormat, SDL_ConvertSurface(), SDL_FreeFormat, and SDL_INLINE.
SDL_Surface* SDL_CreateRGBSurface | ( | Uint32 | flags, |
int | width, | ||
int | height, | ||
int | depth, | ||
Uint32 | Rmask, | ||
Uint32 | Gmask, | ||
Uint32 | Bmask, | ||
Uint32 | Amask | ||
) |
Allocate and free an RGB surface.
If the depth is 4 or 8 bits, an empty palette is allocated for the surface. If the depth is greater than 8 bits, the pixel format is set using the flags '[RGB]mask'.
If the function runs out of memory, it will return NULL.
flags | The flags are obsolete and should be set to 0. |
width | The width in pixels of the surface to create. |
height | The height in pixels of the surface to create. |
depth | The depth in bits of the surface to create. |
Rmask | The red mask of the surface to create. |
Gmask | The green mask of the surface to create. |
Bmask | The blue mask of the surface to create. |
Amask | The alpha mask of the surface to create. |
Definition at line 138 of file SDL_surface.c.
References NULL, SDL_CreateRGBSurfaceWithFormat(), SDL_MasksToPixelFormatEnum, SDL_PIXELFORMAT_UNKNOWN, and SDL_SetError.
Referenced by SDL_ConvertSurface(), and SDL_CreateRGBSurfaceFrom().
SDL_Surface* SDL_CreateRGBSurfaceFrom | ( | void * | pixels, |
int | width, | ||
int | height, | ||
int | depth, | ||
int | pitch, | ||
Uint32 | Rmask, | ||
Uint32 | Gmask, | ||
Uint32 | Bmask, | ||
Uint32 | Amask | ||
) |
Definition at line 158 of file SDL_surface.c.
References SDL_Surface::flags, SDL_Surface::h, NULL, SDL_Surface::pitch, SDL_Surface::pixels, SDL_CreateRGBSurface(), SDL_PREALLOC, SDL_SetClipRect(), and SDL_Surface::w.
SDL_Surface* SDL_CreateRGBSurfaceWithFormat | ( | Uint32 | flags, |
int | width, | ||
int | height, | ||
int | depth, | ||
Uint32 | format | ||
) |
Definition at line 51 of file SDL_surface.c.
References SDL_PixelFormat::Amask, SDL_Color::b, SDL_PixelFormat::BitsPerPixel, SDL_Palette::colors, SDL_Surface::format, SDL_PixelFormat::format, SDL_Color::g, SDL_Surface::h, SDL_Surface::map, SDL_Palette::ncolors, NULL, SDL_Surface::pitch, SDL_Surface::pixels, SDL_Color::r, SDL_Surface::refcount, SDL_AllocBlitMap(), SDL_AllocFormat, SDL_AllocPalette, SDL_BLENDMODE_BLEND, SDL_CalculatePitch(), SDL_calloc, SDL_FreePalette, SDL_FreeSurface(), SDL_ISPIXELFORMAT_INDEXED, SDL_malloc, SDL_MAX_SINT32, SDL_memset, SDL_OutOfMemory, SDL_SetClipRect(), SDL_SetSurfaceBlendMode(), SDL_SetSurfacePalette(), void, and SDL_Surface::w.
Referenced by SDL_CreateRGBSurface(), and SDL_CreateRGBSurfaceWithFormatFrom().
SDL_Surface* SDL_CreateRGBSurfaceWithFormatFrom | ( | void * | pixels, |
int | width, | ||
int | height, | ||
int | depth, | ||
int | pitch, | ||
Uint32 | format | ||
) |
Definition at line 182 of file SDL_surface.c.
References SDL_Surface::flags, SDL_Surface::h, NULL, SDL_Surface::pitch, SDL_Surface::pixels, SDL_CreateRGBSurfaceWithFormat(), SDL_PREALLOC, SDL_SetClipRect(), and SDL_Surface::w.
|
static |
Definition at line 1085 of file SDL_surface.c.
References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_Surface::flags, SDL_Surface::format, SDL_BlitInfo::g, SDL_Surface::h, SDL_BlitMap::info, SDL_Surface::map, SDL_Surface::pitch, SDL_Surface::pixels, SDL_BlitInfo::r, SDL_Surface::refcount, SDL_FALSE, SDL_InitFormat(), SDL_ISPIXELFORMAT_INDEXED, SDL_PREALLOC, SDL_SetError, SDL_TRUE, SDL_zerop, and SDL_Surface::w.
Referenced by SDL_ConvertPixels().
SDL_Surface* SDL_DuplicateSurface | ( | SDL_Surface * | surface | ) |
Definition at line 901 of file SDL_surface.c.
References SDL_Surface::flags, SDL_Surface::format, and SDL_ConvertSurface().
void SDL_FreeSurface | ( | SDL_Surface * | surface | ) |
Definition at line 1292 of file SDL_surface.c.
References SDL_Surface::flags, SDL_Surface::format, SDL_Surface::locked, SDL_Surface::map, NULL, SDL_Surface::pixels, SDL_Surface::refcount, SDL_DONTFREE, SDL_free, SDL_FreeBlitMap(), SDL_FreeFormat, SDL_InvalidateMap(), SDL_PREALLOC, SDL_RLEACCEL, SDL_SetSurfacePalette(), SDL_UnlockSurface(), and SDL_UnRLESurface().
Referenced by SDL_ConvertSurface(), and SDL_CreateRGBSurfaceWithFormat().
void SDL_GetClipRect | ( | SDL_Surface * | surface, |
SDL_Rect * | rect | ||
) |
Gets the clipping rectangle for the destination surface in a blit.
rect
must be a pointer to a valid rectangle which will be filled with the correct values.
Definition at line 540 of file SDL_surface.c.
References SDL_Surface::clip_rect.
int SDL_GetColorKey | ( | SDL_Surface * | surface, |
Uint32 * | key | ||
) |
Gets the color key (transparent pixel) in a blittable surface.
surface | The surface to update |
key | A pointer filled in with the transparent pixel in the native surface format |
Definition at line 281 of file SDL_surface.c.
References SDL_BlitInfo::colorkey, SDL_BlitInfo::flags, SDL_BlitMap::info, SDL_Surface::map, and SDL_COPY_COLORKEY.
int SDL_GetSurfaceAlphaMod | ( | SDL_Surface * | surface, |
Uint8 * | alpha | ||
) |
Get the additional alpha value used in blit operations.
surface | The surface to query. |
alpha | A pointer filled in with the current alpha value. |
Definition at line 437 of file SDL_surface.c.
References SDL_BlitInfo::a, SDL_BlitMap::info, and SDL_Surface::map.
int SDL_GetSurfaceBlendMode | ( | SDL_Surface * | surface, |
SDL_BlendMode * | blendMode | ||
) |
Get the blend mode used for blit operations.
surface | The surface to query. |
blendMode | A pointer filled in with the current blend mode. |
Definition at line 487 of file SDL_surface.c.
References SDL_Surface::map, SDL_BLENDMODE_ADD, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, SDL_BLENDMODE_NONE, SDL_COPY_ADD, SDL_COPY_BLEND, and SDL_COPY_MOD.
int SDL_GetSurfaceColorMod | ( | SDL_Surface * | surface, |
Uint8 * | r, | ||
Uint8 * | g, | ||
Uint8 * | b | ||
) |
Get the additional color value used in blit operations.
surface | The surface to query. |
r | A pointer filled in with the current red color value. |
g | A pointer filled in with the current green color value. |
b | A pointer filled in with the current blue color value. |
Definition at line 395 of file SDL_surface.c.
References SDL_BlitInfo::b, SDL_BlitInfo::g, SDL_BlitMap::info, SDL_Surface::map, and SDL_BlitInfo::r.
int SDL_LockSurface | ( | SDL_Surface * | surface | ) |
Sets up a surface for directly accessing the pixels.
Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write to and read from surface->pixels
, using the pixel format stored in surface->format
. Once you are done accessing the surface, you should use SDL_UnlockSurface() to release it.
Not all surfaces require locking. If SDL_MUSTLOCK(surface) evaluates to 0, then you can read and write to the surface at any time, and the pixel format of the surface will not change.
No operating system or library calls should be made between lock/unlock pairs, as critical system locks may be held during this time.
SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked.
Definition at line 862 of file SDL_surface.c.
References SDL_Surface::flags, SDL_Surface::locked, SDL_RLEACCEL, and SDL_UnRLESurface().
Referenced by SDL_ConvertColorkeyToAlpha().
int SDL_LowerBlit | ( | SDL_Surface * | src, |
SDL_Rect * | srcrect, | ||
SDL_Surface * | dst, | ||
SDL_Rect * | dstrect | ||
) |
This is a semi-private blit function and it performs low-level surface blitting only.
Definition at line 559 of file SDL_surface.c.
References SDL_BlitMap::blit, SDL_BlitMap::dst, SDL_BlitMap::dst_palette_version, SDL_Surface::format, SDL_Surface::map, SDL_PixelFormat::palette, SDL_MapSurface(), SDL_BlitMap::src_palette_version, and SDL_Palette::version.
Referenced by SDL_ConvertPixels(), SDL_ConvertSurface(), SDL_LowerBlitScaled(), and SDL_UpperBlit().
int SDL_LowerBlitScaled | ( | SDL_Surface * | src, |
SDL_Rect * | srcrect, | ||
SDL_Surface * | dst, | ||
SDL_Rect * | dstrect | ||
) |
This is a semi-private blit function and it performs low-level surface scaled blitting only.
Definition at line 835 of file SDL_surface.c.
References SDL_BlitInfo::flags, SDL_Surface::format, SDL_PixelFormat::format, SDL_BlitMap::info, SDL_Surface::map, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_COLORKEY, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_COPY_NEAREST, SDL_InvalidateMap(), SDL_ISPIXELFORMAT_INDEXED, SDL_LowerBlit(), and SDL_SoftStretch.
Referenced by SDL_UpperBlitScaled().
SDL_bool SDL_SetClipRect | ( | SDL_Surface * | surface, |
const SDL_Rect * | rect | ||
) |
Sets the clipping rectangle for the destination surface in a blit.
If the clip rectangle is NULL, clipping will be disabled.
If the clip rectangle doesn't intersect the surface, the function will return SDL_FALSE and blits will be completely clipped. Otherwise the function returns SDL_TRUE and blits to the surface will be clipped to the intersection of the surface area and the clipping rectangle.
Note that blits are automatically clipped to the edges of the source and destination surfaces.
Definition at line 516 of file SDL_surface.c.
References SDL_Surface::clip_rect, SDL_Rect::h, SDL_Surface::h, SDL_FALSE, SDL_IntersectRect, SDL_TRUE, SDL_Rect::w, SDL_Surface::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by SDL_ConvertSurface(), SDL_CreateRGBSurfaceFrom(), SDL_CreateRGBSurfaceWithFormat(), and SDL_CreateRGBSurfaceWithFormatFrom().
int SDL_SetColorKey | ( | SDL_Surface * | surface, |
int | flag, | ||
Uint32 | key | ||
) |
Sets the color key (transparent pixel) in a blittable surface.
surface | The surface to update |
flag | Non-zero to enable colorkey and 0 to disable colorkey |
key | The transparent pixel in the native surface format |
You can pass SDL_RLEACCEL to enable RLE accelerated blits.
Definition at line 236 of file SDL_surface.c.
References SDL_Color::a, SDL_BlitInfo::colorkey, SDL_Palette::colors, SDL_BlitInfo::flags, SDL_Surface::format, SDL_BlitMap::info, SDL_Surface::map, SDL_Palette::ncolors, SDL_PixelFormat::palette, SDL_ALPHA_OPAQUE, SDL_ALPHA_TRANSPARENT, SDL_COPY_COLORKEY, SDL_InvalidateMap(), SDL_InvalidParamError, SDL_RLEACCEL, SDL_SetSurfaceRLE(), and SDL_Palette::version.
Referenced by SDL_ConvertColorkeyToAlpha(), and SDL_ConvertSurface().
int SDL_SetSurfaceAlphaMod | ( | SDL_Surface * | surface, |
Uint8 | alpha | ||
) |
Set an additional alpha value used in blit operations.
surface | The surface to update. |
alpha | The alpha value multiplied into blit operations. |
Definition at line 414 of file SDL_surface.c.
References SDL_BlitInfo::a, SDL_BlitInfo::flags, SDL_BlitMap::info, SDL_Surface::map, SDL_COPY_MODULATE_ALPHA, and SDL_InvalidateMap().
int SDL_SetSurfaceBlendMode | ( | SDL_Surface * | surface, |
SDL_BlendMode | blendMode | ||
) |
Set the blend mode used for blit operations.
surface | The surface to update. |
blendMode | SDL_BlendMode to use for blit blending. |
Definition at line 450 of file SDL_surface.c.
References SDL_BlitInfo::flags, SDL_BlitMap::info, SDL_Surface::map, SDL_BLENDMODE_ADD, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, SDL_BLENDMODE_NONE, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_InvalidateMap(), and SDL_Unsupported.
Referenced by SDL_ConvertColorkeyToAlpha(), SDL_ConvertSurface(), and SDL_CreateRGBSurfaceWithFormat().
int SDL_SetSurfaceColorMod | ( | SDL_Surface * | surface, |
Uint8 | r, | ||
Uint8 | g, | ||
Uint8 | b | ||
) |
Set an additional color value used in blit operations.
surface | The surface to update. |
r | The red color value multiplied into blit operations. |
g | The green color value multiplied into blit operations. |
b | The blue color value multiplied into blit operations. |
Definition at line 369 of file SDL_surface.c.
References SDL_BlitInfo::b, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitMap::info, SDL_Surface::map, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, and SDL_InvalidateMap().
int SDL_SetSurfacePalette | ( | SDL_Surface * | surface, |
SDL_Palette * | palette | ||
) |
Set the palette used by a surface.
Definition at line 201 of file SDL_surface.c.
References SDL_Surface::format, SDL_Surface::map, SDL_InvalidateMap(), SDL_SetError, and SDL_SetPixelFormatPalette.
Referenced by SDL_ConvertSurface(), SDL_CreateRGBSurfaceWithFormat(), and SDL_FreeSurface().
int SDL_SetSurfaceRLE | ( | SDL_Surface * | surface, |
int | flag | ||
) |
Sets the RLE acceleration hint for a surface.
Definition at line 215 of file SDL_surface.c.
References SDL_BlitInfo::flags, SDL_BlitMap::info, SDL_Surface::map, SDL_COPY_RLE_DESIRED, and SDL_InvalidateMap().
Referenced by SDL_ConvertSurface(), and SDL_SetColorKey().
void SDL_UnlockSurface | ( | SDL_Surface * | surface | ) |
Definition at line 883 of file SDL_surface.c.
References SDL_Surface::flags, SDL_Surface::locked, SDL_RLEACCEL, and SDL_RLESurface().
Referenced by SDL_ConvertColorkeyToAlpha(), and SDL_FreeSurface().
int SDL_UpperBlit | ( | SDL_Surface * | src, |
const SDL_Rect * | srcrect, | ||
SDL_Surface * | dst, | ||
SDL_Rect * | dstrect | ||
) |
This is the public blit function, SDL_BlitSurface(), and it performs rectangle validation and clipping before passing it to SDL_LowerBlit()
Definition at line 582 of file SDL_surface.c.
References SDL_Surface::clip_rect, SDL_BlitInfo::flags, SDL_Rect::h, SDL_Surface::h, SDL_BlitMap::info, SDL_Surface::locked, SDL_Surface::map, NULL, SDL_COPY_NEAREST, SDL_InvalidateMap(), SDL_LowerBlit(), SDL_SetError, SDL_Rect::w, SDL_Surface::w, SDL_Rect::x, and SDL_Rect::y.
int SDL_UpperBlitScaled | ( | SDL_Surface * | src, |
const SDL_Rect * | srcrect, | ||
SDL_Surface * | dst, | ||
SDL_Rect * | dstrect | ||
) |
This is the public scaled blit function, SDL_BlitScaled(), and it performs rectangle validation and clipping before passing it to SDL_LowerBlitScaled()
Definition at line 681 of file SDL_surface.c.
References SDL_Surface::clip_rect, SDL_Rect::h, SDL_Surface::h, SDL_Surface::locked, NULL, SDL_BlitSurface, SDL_floor, SDL_LowerBlitScaled(), SDL_SetError, SDL_Rect::w, SDL_Surface::w, SDL_Rect::x, and SDL_Rect::y.