SDL_Surface Struct Reference

A collection of pixels used in software blitting. More...

`#include <SDL_surface.h>`

Collaboration diagram for SDL_Surface:
[legend]

## Data Fields

Uint32 | flags
SDL_PixelFormat * | format
int | w
int | h
int | pitch
void * | pixels
void * | userdata
int | locked
void * | lock_data
SDL_Rect | clip_rect
struct SDL_BlitMap * | map
int | refcount

## Detailed Description

A collection of pixels used in software blitting.

Note
  This structure should be treated as read-only, except for `pixels`, which, if not NULL, contains the raw pixel data for the surface.

Definition at line 69 of file SDL_surface.h.

## Field Documentation

## clip_rect

SDL_Rect SDL_Surface::clip_rect

clipping information Read-only

Definition at line 85 of file SDL_surface.h.

Referenced by SDL_BlendFillRect(), SDL_BlendFillRects(), SDL_BlendLine(), SDL_BlendLines(), SDL_BlendPoint(), SDL_BlendPoints(), SDL_ConvertSurface(), SDL_DrawLine(), SDL_DrawLines(), SDL_DrawPoint(), SDL_DrawPoints(), SDL_FillRect(), SDL_GetClipRect(), SDL_SetClipRect(), SDL_UpperBlit(), SDL_UpperBlitScaled(), and SW_RenderClear().

## flags

Uint32 SDL_Surface::flags

Read-only

Definition at line 71 of file SDL_surface.h.

Referenced by RLEAlphaSurface(), RLEColorkeySurface(), SDL_CalculateBlit(), SDL_CreateRGBSurfaceFrom(), SDL_CreateRGBSurfaceWithFormatFrom(), SDL_CreateSurfaceOnStack(), SDL_DestroyWindow(), SDL_DuplicateSurface(), SDL_FreeSurface(), SDL_GetWindowSurface(), SDL_GL_DeleteContext(), SDL_LockSurface(), SDL_MapSurface(), SDL_RecreateWindow(), SDL_RLESurface(), SDL_UnlockSurface(), and SDL_UnRLESurface().

## format

SDL_PixelFormat* SDL_Surface::format

Read-only

Definition at line 72 of file SDL_surface.h.

Referenced by _clearTestSurface(), LoadSprite(), LoadTexture(), main(), RecursivelyCalculateShapeTree(), RLEAlphaClipBlit(), RLEAlphaSurface(), RLEClipBlit(), RLEColorkeySurface(), run_automated_tests(), SDL_BlendFillRect(), SDL_BlendFillRect_RGB(), SDL_BlendFillRect_RGBA(), SDL_BlendFillRects(), SDL_BlendLine(), SDL_BlendLine_RGB2(), SDL_BlendLine_RGB4(), SDL_BlendLine_RGBA4(), SDL_BlendLines(), SDL_BlendPoint(), SDL_BlendPoint_RGB(), SDL_BlendPoint_RGBA(), SDL_BlendPoints(), SDL_CalculateBlit(), SDL_CalculateBlit0(), SDL_CalculateBlit1(), SDL_CalculateBlitA(), SDL_CalculateBlitN(), SDL_CalculateShapeBitmap(), SDL_ConvertColorkeyToAlpha(), SDL_ConvertSurface(), SDL_CreateColorCursor(), SDL_CreateRGBSurfaceWithFormat(), SDL_CreateSurfaceOnStack(), SDL_CreateTextureFromSurface(), SDL_DrawLine(), SDL_DrawLine1(), SDL_DrawLine2(), SDL_DrawLine4(), SDL_DrawLines(), SDL_DrawPoint(), SDL_DrawPoints(), SDL_DuplicateSurface(), SDL_FillRect(), SDL_FreeSurface(), SDL_GL_DeleteContext(), SDL_LoadBMP_RW(), SDL_LowerBlit(), SDL_LowerBlitScaled(), SDL_MapSurface(), SDL_RLEAlphaBlit(), SDL_RLEBlit(), SDL_RLESurface(), SDL_SaveBMP_RW(), SDL_SetColorKey(), SDL_SetSurfacePalette(), SDL_SoftStretch(), SDLgfx_rotateSurface(), SDLTest_CompareSurfaces(), SDLTest_LoadIcon(), SDLTest_ScreenShot(), setpix(), surface_testCompleteSurfaceConversion(), surface_testSurfaceConversion(), SW_LockTexture(), SW_RenderClear(), SW_RenderCopyEx(), SW_RenderDrawLines(), SW_RenderDrawPoints(), SW_RenderFillRects(), SW_RenderReadPixels(), SW_SetTextureAlphaMod(), SW_UpdateTexture(), UnRLEAlpha(), and verify_yuv_data().

## h

int SDL_Surface::h

Read-only

Definition at line 73 of file SDL_surface.h.

Referenced by _Redraw(), _surfaceSetUp(), _testBlitBlendMode(), _transformSurfaceRGBA(), computeSourceIncrements90(), CorrectAlphaChannel(), drawKnob(), DrawScreen(), generate_test_pattern(), LoadSprite(), main(), RLEAlphaSurface(), RLEColorkeySurface(), run_automated_tests(), SDL_CalculateShapeBitmap(), SDL_CalculateShapeTree(), SDL_ConvertColorkeyToAlpha(), SDL_ConvertSurface(), SDL_CreateColorCursor(), SDL_CreateRGBSurfaceFrom(), SDL_CreateRGBSurfaceWithFormat(), SDL_CreateRGBSurfaceWithFormatFrom(), SDL_CreateSurfaceOnStack(), SDL_CreateTextureFromSurface(), SDL_GL_DeleteContext(), SDL_LoadBMP_RW(), SDL_SaveBMP_RW(), SDL_SetClipRect(), SDL_SoftStretch(), SDL_SW_CopyYUVToRGB(), SDL_UnRLESurface(), SDL_UpperBlit(), SDL_UpperBlitScaled(), SDLgfx_rotateSurface(), SDLTest_CompareSurfaces(), setpix(), surface_testSaveLoadBitmap(), SW_GetOutputSize(), SW_RenderCopyEx(), SW_RenderReadPixels(), transformSurfaceY(), UnRLEAlpha(), and verify_yuv_data().

## lock_data

void* SDL_Surface::lock_data

Read-only

Definition at line 82 of file SDL_surface.h.

## locked

int SDL_Surface::locked

information needed for surfaces requiring locks Read-only

Definition at line 81 of file SDL_surface.h.

Referenced by SDL_FreeSurface(), SDL_LockSurface(), SDL_UnlockSurface(), SDL_UpperBlit(), and SDL_UpperBlitScaled().

## map

struct SDL_BlitMap* SDL_Surface::map

info for fast blit mapping to other surfaces Private

Definition at line 88 of file SDL_surface.h.

Referenced by RLEAlphaSurface(), RLEColorkeySurface(), SDL_CalculateBlit(), SDL_CalculateBlit0(), SDL_CalculateBlit1(), SDL_CalculateBlitA(), SDL_CalculateBlitN(), SDL_ConvertColorkeyToAlpha(), SDL_ConvertSurface(), SDL_CreateRGBSurfaceWithFormat(), SDL_CreateSurfaceOnStack(), SDL_FreeSurface(), SDL_GetColorKey(), SDL_GetSurfaceAlphaMod(), SDL_GetSurfaceBlendMode(), SDL_GetSurfaceColorMod(), SDL_LowerBlit(), SDL_LowerBlitScaled(), SDL_MapSurface(), SDL_RLEAlphaBlit(), SDL_RLEBlit(), SDL_RLESurface(), SDL_SaveBMP_RW(), SDL_SetColorKey(), SDL_SetSurfaceAlphaMod(), SDL_SetSurfaceBlendMode(), SDL_SetSurfaceColorMod(), SDL_SetSurfacePalette(), SDL_SetSurfaceRLE(), SDL_SoftBlit(), SDL_UnRLESurface(), SDL_UpperBlit(), and UnRLEAlpha().

## pitch

int SDL_Surface::pitch

Read-only

Definition at line 74 of file SDL_surface.h.

Referenced by _transformSurfaceRGBA(), computeSourceIncrements90(), CorrectAlphaChannel(), generate_test_pattern(), main(), RecursivelyCalculateShapeTree(), RLEAlphaSurface(), RLEColorkeySurface(), run_automated_tests(), SDL_CalculateBlit(), SDL_CalculateShapeBitmap(), SDL_ConvertColorkeyToAlpha(), SDL_CreateCursor(), SDL_CreateRGBSurfaceFrom(), SDL_CreateRGBSurfaceWithFormat(), SDL_CreateRGBSurfaceWithFormatFrom(), SDL_CreateSurfaceOnStack(), SDL_CreateTextureFromSurface(), SDL_DrawLine1(), SDL_FillRect(), SDL_GL_DeleteContext(), SDL_LoadBMP_RW(), SDL_RLEAlphaBlit(), SDL_RLEBlit(), SDL_SaveBMP_RW(), SDL_SoftBlit(), SDL_SoftStretch(), SDL_SW_CopyYUVToRGB(), SDL_UnRLESurface(), SDLTest_CompareSurfaces(), SDLTest_DrawCharacter(), SDLTest_ScreenShot(), setpix(), SW_LockTexture(), SW_RenderCopyEx(), SW_RenderReadPixels(), SW_UpdateTexture(), transformSurfaceY(), UnRLEAlpha(), and verify_yuv_data().

## pixels

void* SDL_Surface::pixels

Read-write

Definition at line 75 of file SDL_surface.h.

Referenced by _transformSurfaceRGBA(), CorrectAlphaChannel(), generate_test_pattern(), LoadSprite(), LoadTexture(), main(), RecursivelyCalculateShapeTree(), RLEAlphaSurface(), RLEColorkeySurface(), run_automated_tests(), SDL_CalculateShapeBitmap(), SDL_ConvertColorkeyToAlpha(), SDL_ConvertSurface(), SDL_CreateCursor(), SDL_CreateRGBSurfaceFrom(), SDL_CreateRGBSurfaceWithFormat(), SDL_CreateRGBSurfaceWithFormatFrom(), SDL_CreateSurfaceOnStack(), SDL_CreateTextureFromSurface(), SDL_DrawLine1(), SDL_FillRect(), SDL_FreeSurface(), SDL_GL_DeleteContext(), SDL_LoadBMP_RW(), SDL_RLEAlphaBlit(), SDL_RLEBlit(), SDL_RLESurface(), SDL_SaveBMP_RW(), SDL_SoftBlit(), SDL_SoftStretch(), SDL_SW_CopyYUVToRGB(), SDL_UnRLESurface(), SDLTest_CompareSurfaces(), SDLTest_DrawCharacter(), SDLTest_LoadIcon(), SDLTest_ScreenShot(), setpix(), surface_testCompleteSurfaceConversion(), SW_LockTexture(), SW_RenderCopyEx(), SW_RenderReadPixels(), SW_UpdateTexture(), transformSurfaceY(), UnRLEAlpha(), and verify_yuv_data().

## refcount

int SDL_Surface::refcount

Reference count – used when freeing surface Read-mostly

Definition at line 91 of file SDL_surface.h.

Referenced by SDL_CreateRGBSurfaceWithFormat(), SDL_CreateSurfaceOnStack(), SDL_FreeSurface(), SDL_InvalidateMap(), and SDL_MapSurface().

## userdata

void* SDL_Surface::userdata

Application data associated with the surface Read-write

Definition at line 78 of file SDL_surface.h.

## w

int SDL_Surface::w

Definition at line 73 of file SDL_surface.h.

Referenced by _Redraw(), _surfaceSetUp(), _testBlitBlendMode(), _transformSurfaceRGBA(), computeSourceIncrements90(), drawKnob(), DrawScreen(), generate_test_pattern(), LoadSprite(), main(), RLEAlphaSurface(), RLEColorkeySurface(), run_automated_tests(), SDL_CalculateShapeBitmap(), SDL_CalculateShapeTree(), SDL_ConvertColorkeyToAlpha(), SDL_ConvertSurface(), SDL_CreateColorCursor(), SDL_CreateRGBSurfaceFrom(), SDL_CreateRGBSurfaceWithFormat(), SDL_CreateRGBSurfaceWithFormatFrom(), SDL_CreateSurfaceOnStack(), SDL_CreateTextureFromSurface(), SDL_GL_DeleteContext(), SDL_LoadBMP_RW(), SDL_RLEAlphaBlit(), SDL_RLEBlit(), SDL_SaveBMP_RW(), SDL_SetClipRect(), SDL_SoftStretch(), SDL_SW_CopyYUVToRGB(), SDL_UnRLESurface(), SDL_UpperBlit(), SDL_UpperBlitScaled(), SDLTest_CompareSurfaces(), setpix(), surface_testSaveLoadBitmap(), SW_GetOutputSize(), SW_RenderCopyEx(), SW_RenderReadPixels(), transformSurfaceY(), UnRLEAlpha(), and verify_yuv_data().

The documentation for this struct was generated from the following file:

- include/SDL_surface.h