Wiki Page Content

Differences between revisions 18 and 19
Revision 18 as of 2010-12-12 20:25:33
Size: 3069
Editor: SheenaSmith
Comment: remove draft
Revision 19 as of 2010-12-12 20:32:00
Size: 3374
Editor: SheenaSmith
Comment: update content - w/ Sam
Deletions are marked like this. Additions are marked like this.
Line 14: Line 14:
||void* ||'''pixels''' ||the pointer to the actual pixel data; the surface should be locked by [[SDL_LockSurface]]() before accessing this field (read-write) || ||void* ||'''pixels''' ||the pointer to the actual pixel data; see [[#Remarks|Remarks]] for details (read-write) ||
Line 16: Line 16:
||<style="color: rgb(128, 128, 128);">int ||<style="color: rgb(128, 128, 128);">'''locked''' ||<style="color: rgb(128, 128, 128);">internal ||
||<style="color: rgb(128, 128, 128);">void* ||<style="color: rgb(128, 128, 128);">'''lock_data''' ||<style="color: rgb(128, 128, 128);">internal ||
||<style="color: rgb(128, 128, 128);">int ||<style="color: rgb(128, 128, 128);">'''locked''' ||<style="color: rgb(128, 128, 128);">internal; used for surfaces that require locking ||
||<style="color: rgb(128, 128, 128);">void* ||<style="color: rgb(128, 128, 128);">'''lock_data''' ||<style="color: rgb(128, 128, 128);">internal; used for surfaces that require locking ||
Line 30: Line 30:
''You can add useful comments here'' With most surfaces you can access the pixels directly, Surfaces that have been run-length-encoded by [[SDL_SetSurfaceRLE]]() should be locked by [[SDL_LockSurface]]() before accessing this field. When you are done accessing the pixels they should be unlocked with [[SDL_UnlockSurface]]() before blitting.

SDL_Surface

A structure that contains a collection of pixels used in software blitting.

Data Fields

Uint32

flags

internal

SDL_PixelFormat*

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 scanline 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

SDL_Rect

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 run-length-encoded by SDL_SetSurfaceRLE() should be locked by SDL_LockSurface() before accessing this field. When you are done accessing the pixels they should be unlocked with SDL_UnlockSurface() before blitting.


CategoryStruct, CategorySurface

None: SDL_Surface (last edited 2017-07-14 21:51:36 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit