comparison include/SDL_surface.h @ 5141:da10636e5eca

Making the API simpler, scaling is always defined as linear interpolation and should be supported as much as possible on all renderers.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 31 Jan 2011 22:44:43 -0800
parents 158bb5752974
children d72793305335
comparison
equal deleted inserted replaced
5140:e594f07297a9 5141:da10636e5eca
31 31
32 #include "SDL_stdinc.h" 32 #include "SDL_stdinc.h"
33 #include "SDL_pixels.h" 33 #include "SDL_pixels.h"
34 #include "SDL_rect.h" 34 #include "SDL_rect.h"
35 #include "SDL_blendmode.h" 35 #include "SDL_blendmode.h"
36 #include "SDL_scalemode.h"
37 #include "SDL_rwops.h" 36 #include "SDL_rwops.h"
38 37
39 #include "begin_code.h" 38 #include "begin_code.h"
40 /* Set up for C function definitions, even when using C++ */ 39 /* Set up for C function definitions, even when using C++ */
41 #ifdef __cplusplus 40 #ifdef __cplusplus
314 * 313 *
315 * \sa SDL_SetSurfaceBlendMode() 314 * \sa SDL_SetSurfaceBlendMode()
316 */ 315 */
317 extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface, 316 extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface,
318 SDL_BlendMode *blendMode); 317 SDL_BlendMode *blendMode);
319
320 /**
321 * \brief Set the scale mode used for blit operations.
322 *
323 * \param surface The surface to update.
324 * \param scaleMode ::SDL_ScaleMode to use for blit scaling.
325 *
326 * \return 0 on success, or -1 if the surface is not valid or the scale mode is
327 * not supported.
328 *
329 * \note If the scale mode is not supported, the closest supported mode is
330 * chosen. Currently only ::SDL_TEXTURESCALEMODE_FAST is supported on
331 * surfaces.
332 *
333 * \sa SDL_GetSurfaceScaleMode()
334 */
335 extern DECLSPEC int SDLCALL SDL_SetSurfaceScaleMode(SDL_Surface * surface,
336 SDL_ScaleMode scaleMode);
337
338 /**
339 * \brief Get the scale mode used for blit operations.
340 *
341 * \param surface The surface to query.
342 * \param scaleMode A pointer filled in with the current scale mode.
343 *
344 * \return 0 on success, or -1 if the surface is not valid.
345 *
346 * \sa SDL_SetSurfaceScaleMode()
347 */
348 extern DECLSPEC int SDLCALL SDL_GetSurfaceScaleMode(SDL_Surface * surface,
349 SDL_ScaleMode *scaleMode);
350 318
351 /** 319 /**
352 * Sets the clipping rectangle for the destination surface in a blit. 320 * Sets the clipping rectangle for the destination surface in a blit.
353 * 321 *
354 * If the clip rectangle is NULL, clipping will be disabled. 322 * If the clip rectangle is NULL, clipping will be disabled.