|
Size: 4437
Comment: temp
|
Size: 3311
Comment: update content (w/ Sam)
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 11: | Line 11: |
| ||<style="color: #808080;">Uint32||<style="color: #808080;">'''flags'''||<style="color: #808080;">internal, read-only; see [[#Remarks|Remarks]] for details|| | ||<style="color: #808080;">Uint32||<style="color: #808080;">'''flags'''||<style="color: #808080;">internal|| |
| Line 24: | Line 24: |
| ||<style="color: #808080;">SDL_!BlitMap*||<style="color: #808080;">'''map'''||<style="color: #808080;">Internal (struct)|| | ||<style="color: #808080;">SDL_!BlitMap*||<style="color: #808080;">'''map'''||<style="color: #808080;">internal|| |
| Line 26: | Line 26: |
| ||unsigned int ^Uint?^||'''format_version'''||private|| | ||unsigned int ^Uint?^||'''format_version'''||<style="color: #808080;">internal|| |
| Line 29: | Line 29: |
| <<Color2(green,Should the gray rows be centered or leave them like this since they are a little different? Would it be more consistent to move the italics text into the description cells? Should map and format_version be gray because they're private? Should SDL_!BlitMap have a page or have the link removed? There are more descriptions in the old wiki such as "the length of a surface scanline in bytes" for '''pitch'''. Should any of those be moved here to clarify the information that this struct holds even though it's mostly read-only?)>> | <<Color2(green,There are more descriptions in the old wiki such as "the length of a surface scanline in bytes" for '''pitch'''. Should any of those be moved here to clarify the information that this struct holds even though it's mostly read-only?)>> |
| Line 37: | Line 37: |
| This structure should be treated as read-only, except for '''pixels''', which, if not NULL, contains the raw pixel data for the surface. | An [[SDL_Surface]] structure represents an area of graphical memory that can be drawn to. |
| Line 39: | Line 39: |
| The currently supported '''flags''' for [[SDL_Surface]] are:<<BR>> or<<BR>> '''flags''' may be 0 or any of the following OR'd together: ||SDL_PREALLOC||surface uses preallocated memory|| ||SDL_RLEACCEL||surface is RLE encoded|| <<Color2(green,There are MANY more flags listed in the old wiki. Should any of them be moved here? http://www.libsdl.org/cgi/docwiki.cgi/SDL_Surface)>> ^The following^ Evaluates to true if the surface needs to be locked before access. {{{ #define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0) }}} <<Color2(green,I don't know where the above came from...)>> *<<BR>>An [[SDL_Surface]] represents an area of graphical memory that can be drawn to. The video framebuffer is returned as an [[SDL_Surface]] by [[SDL_SetVideoMode]]() and [[SDL_GetVideoSurface]](). <<Color2(green,The two above functions are not in 1.3. Have they been replaced?)>><<BR>>* |
This structure should be treated as read-only, except for '''pixels''' which, if not NULL, contains the raw pixel data for the surface. |
| Line 99: | Line 83: |
| .[[SDL_MUSTLOCK]] |
DRAFT |
SDL_Surface
A structure that contains a collection of pixels used in software blitting.
Data Fields
Uint32 |
flags |
internal |
format |
read-only |
|
int |
w, h |
read-only |
int |
pitch |
read-only |
void* |
pixels |
read-write |
Application data associated with the surface |
||
void* |
userdata |
read-write |
Information needed for surfaces requiring locks |
||
int |
locked |
read-only |
void* |
lock_data |
read-only |
Clipping information |
||
clip_rect |
read-only |
|
Info for fast blit mapping to other surfaces |
||
SDL_BlitMap* |
map |
internal |
Format version, bumped at every change to invalidate blit maps |
||
unsigned int Uint? |
format_version |
internal |
Reference count -- used when freeing surface |
||
int |
refcount |
read-mostly |
green
Code Examples
You can add your code example here
Remarks
An SDL_Surface structure represents an area of graphical memory that can be drawn to.
This structure should be treated as read-only, except for pixels which, if not NULL, contains the raw pixel data for the surface.
Related Structures
