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 70 of file SDL_surface.h.

## Field Documentation

## clip_rect

SDL_Rect SDL_Surface::clip_rect

clipping information Read-only

Definition at line 86 of file SDL_surface.h.

Referenced by SDL_ConvertSurface().

## flags

Uint32 SDL_Surface::flags

Read-only

Definition at line 72 of file SDL_surface.h.

## format

SDL_PixelFormat* SDL_Surface::format

Read-only

Definition at line 73 of file SDL_surface.h.

Referenced by _clearTestSurface(), LoadSprite(), LoadTexture(), main(), RLEAlphaClipBlit(), RLEAlphaSurface(), RLEClipBlit(), SDL_CalculateShapeBitmap(), SDL_ConvertSurface(), SDL_RLEAlphaBlit(), SDL_RLEBlit(), SDL_SaveBMP_RW(), SDLgfx_rotateSurface(), SDLTest_CompareSurfaces(), SDLTest_LoadIcon(), and surface_testSurfaceConversion().

## h

int SDL_Surface::h

Read-only

Definition at line 74 of file SDL_surface.h.

Referenced by _Redraw(), _surfaceSetUp(), _testBlitBlendMode(), LoadSprite(), main(), SDL_CalculateShapeBitmap(), SDL_CalculateShapeTree(), SDL_SW_CopyYUVToRGB(), SDLgfx_rotateSurface(), SDLTest_CompareSurfaces(), and surface_testSaveLoadBitmap().

## lock_data

void* SDL_Surface::lock_data

Read-only

Definition at line 83 of file SDL_surface.h.

## locked

int SDL_Surface::locked

information needed for surfaces requiring locks Read-only

Definition at line 82 of file SDL_surface.h.

## map

struct SDL_BlitMap* SDL_Surface::map

info for fast blit mapping to other surfaces Private

Definition at line 89 of file SDL_surface.h.

Referenced by RLEAlphaSurface(), SDL_ConvertSurface(), SDL_RLEAlphaBlit(), SDL_RLEBlit(), and SDL_SaveBMP_RW().

## pitch

int SDL_Surface::pitch

Read-only

Definition at line 75 of file SDL_surface.h.

Referenced by main(), SDL_CalculateShapeBitmap(), SDL_CreateTextureFromSurface(), SDL_RLEAlphaBlit(), SDL_RLEBlit(), SDL_SW_CopyYUVToRGB(), SDLTest_CompareSurfaces(), SDLTest_DrawCharacter(), and SW_LockTexture().

## pixels

void* SDL_Surface::pixels

Read-write

Definition at line 76 of file SDL_surface.h.

Referenced by LoadSprite(), LoadTexture(), main(), SDL_CalculateShapeBitmap(), SDL_ConvertSurface(), SDL_CreateTextureFromSurface(), SDL_RLEAlphaBlit(), SDL_RLEBlit(), SDL_SW_CopyYUVToRGB(), SDLTest_CompareSurfaces(), SDLTest_DrawCharacter(), and SDLTest_LoadIcon().

## refcount

int SDL_Surface::refcount

Reference count – used when freeing surface Read-mostly

Definition at line 92 of file SDL_surface.h.

## userdata

void* SDL_Surface::userdata

Application data associated with the surface Read-write

Definition at line 79 of file SDL_surface.h.

## w

int SDL_Surface::w

Definition at line 74 of file SDL_surface.h.

Referenced by _Redraw(), _surfaceSetUp(), _testBlitBlendMode(), LoadSprite(), main(), SDL_CalculateShapeBitmap(), SDL_CalculateShapeTree(), SDL_RLEAlphaBlit(), SDL_RLEBlit(), SDL_SW_CopyYUVToRGB(), SDLTest_CompareSurfaces(), and surface_testSaveLoadBitmap().

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

- include/SDL_surface.h