|
Size: 3278
Comment: create page - 2/14 changeset 5295 (since 5138) remove Get/SetSurfaceScaleMode
|
Size: 2953
Comment: update page - 2/3 changeset 5163 (2/23 5391); camelcase pragma change
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 2: | Line 2: |
| #pragma disable-camelcase | #pragma camelcase off |
| Line 33: | Line 33: |
| . [[SDL_BlendFillRect]] . [[SDL_BlendFillRects]] . [[SDL_BlendLine]] . [[SDL_BlendLines]] . [[SDL_BlendPoint]] . [[SDL_BlendPoints]] . [[SDL_BlendRect]] . [[SDL_BlendRects]] |
|
| Line 44: | Line 36: |
| . [[SDL_DrawLine]] . [[SDL_DrawLines]] . [[SDL_DrawPoint]] . [[SDL_DrawPoints]] . [[SDL_DrawRect]] . [[SDL_DrawRects]] |
SDL_Surface
A structure that contains a collection of pixels used in software blitting.
Data Fields
Uint32 |
flags |
internal |
format |
the format of the pixels stored in the surface; see SDL_PixelFormat for details (read-only) |
|
int |
w, h |
the width and height in pixels (read-only) |
int |
pitch |
the length of a row of pixels in bytes (read-only) |
void* |
pixels |
the pointer to the actual pixel data; see Remarks for details (read-write) |
void* |
userdata |
an arbitrary pointer you can set (read-write) |
int |
locked |
internal; used for surfaces that require locking |
void* |
lock_data |
internal; used for surfaces that require locking |
clip_rect |
an SDL_Rect structure used to clip blits to the surface which can be set by SDL_SetClipRect() (read-only) |
|
SDL_BlitMap* |
map |
internal; info for fast blit mapping to other surfaces |
int |
format_version |
internal; bumped at every change to invalidate blit maps |
int |
refcount |
reference count that can be incremented by the application |
Code Examples
You can add your code example here
Remarks
With most surfaces you can access the pixels directly. Surfaces that have been optimized with SDL_SetSurfaceRLE() should be locked with SDL_LockSurface() before accessing pixels. When you are done you should call SDL_UnlockSurface() before blitting.
