home *** CD-ROM | disk | FTP | other *** search
- <!-- manual page source format generated by PolyglotMan v3.0.8+X.Org, -->
- <!-- available at http://polyglotman.sourceforge.net/ -->
-
- <html>
- <head>
- <title>"SDL_Surface"("3") manual page</title>
- </head>
- <body bgcolor='#efefef' text='black' link='blue' vlink='#551A8B' alink='red'>
- <a href='#toc'>Table of Contents</a><p>
-
- <h2><a name='sect0' href='#toc0'>Name</a></h2>
- SDL_Surface- Graphical Surface Structure
- <h2><a name='sect1' href='#toc1'>Structure Definition</a></h2>
- <p>
- <br>
- <pre>CWtypedef struct SDL_Surface {
- Uint32 flags; /* Read-only */
- SDL_PixelFormat *format; /* Read-only */
- int w, h; /* Read-only */
- Uint16 pitch; /* Read-only */
- void *pixels; /* Read-write */
- /* clipping information */
- SDL_Rect clip_rect; /* Read-only */
- /* Reference count -- used when freeing surface */
- int refcount; /* Read-mostly */
- <tt> </tt> <tt> </tt> /* This structure also contains private fields not shown here */
- } SDL_Surface;
- </pre><p>
-
- <h2><a name='sect2' href='#toc2'>Structure Data</a></h2>
-
- <dl>
-
- <dt><b>flags</b> </dt>
- <dd>Surface flags </dd>
-
- <dt><b>format</b> </dt>
- <dd>Pixel <i>format</i> </dd>
-
- <dt><b>w, h</b> </dt>
- <dd>Width and height
- of the surface </dd>
-
- <dt><b>pitch</b> </dt>
- <dd>Length of a surface scanline in bytes </dd>
-
- <dt><b>pixels</b> </dt>
- <dd>Pointer
- to the actual pixel data </dd>
-
- <dt><b>clip_rect</b> </dt>
- <dd>surface clip <i>rectangle</i> </dd>
- </dl>
-
- <h2><a name='sect3' href='#toc3'>Description</a></h2>
- <p>
- <b>SDL_Surface</b>'s
- represent areas of "graphical" memory, memory that can be drawn to. The
- video framebuffer is returned as a <b>SDL_Surface</b> by <i><b>SDL_SetVideoMode</b></i> and
- <i><b>SDL_GetVideoSurface</b></i>. Most of the fields should be pretty obvious. <b>w</b> and <b>h</b>
- are the width and height of the surface in pixels. <b>pixels</b> is a pointer to
- the actual pixel data, the surface should be <i>locked</i> before accessing this
- field. The <b>clip_rect</b> field is the clipping rectangle as set by <i><b>SDL_SetClipRect</b></i>.
- <p>
- The following are supported in the <b>flags</b> field.
- <dl>
-
- <dt><b>SDL_SWSURFACE</b> </dt>
- <dd>Surface is
- stored in system memory </dd>
-
- <dt><b>SDL_HWSURFACE</b> </dt>
- <dd>Surface is stored in video memory
- </dd>
-
- <dt><b>SDL_ASYNCBLIT</b> </dt>
- <dd>Surface uses asynchronous blits if possible </dd>
-
- <dt><b>SDL_ANYFORMAT</b>
- </dt>
- <dd>Allows any pixel-format (Display surface) </dd>
-
- <dt><b>SDL_HWPALETTE</b> </dt>
- <dd>Surface has exclusive
- palette </dd>
-
- <dt><b>SDL_DOUBLEBUF</b> </dt>
- <dd>Surface is double buffered (Display surface) </dd>
-
- <dt><b>SDL_FULLSCREEN</b>
- </dt>
- <dd>Surface is full screen (Display Surface) </dd>
-
- <dt><b>SDL_OPENGL</b> </dt>
- <dd>Surface has an OpenGL
- context (Display Surface) </dd>
-
- <dt><b>SDL_OPENGLBLIT</b> </dt>
- <dd>Surface supports OpenGL blitting
- (Display Surface) </dd>
-
- <dt><b>SDL_RESIZABLE</b> </dt>
- <dd>Surface is resizable (Display Surface)
- </dd>
-
- <dt><b>SDL_HWACCEL</b> </dt>
- <dd>Surface blit uses hardware acceleration </dd>
-
- <dt><b>SDL_SRCCOLORKEY</b> </dt>
- <dd>Surface
- use colorkey blitting </dd>
-
- <dt><b>SDL_RLEACCEL</b> </dt>
- <dd>Colorkey blitting is accelerated with
- RLE </dd>
-
- <dt><b>SDL_SRCALPHA</b> </dt>
- <dd>Surface blit uses alpha blending </dd>
-
- <dt><b>SDL_PREALLOC</b> </dt>
- <dd>Surface
- uses preallocated memory </dd>
- </dl>
-
- <h2><a name='sect4' href='#toc4'>See Also</a></h2>
- <p>
- <i><b>SDL_PixelFormat</b></i>
- <!--
-
- <p>
-
- <hr><p>
- <a name='toc'><b>Table of Contents</b></a><p>
- <ul>
- <li><a name='toc0' href='#sect0'>Name</a></li>
- <li><a name='toc1' href='#sect1'>Structure Definition</a></li>
- <li><a name='toc2' href='#sect2'>Structure Data</a></li>
- <li><a name='toc3' href='#sect3'>Description</a></li>
- <li><a name='toc4' href='#sect4'>See Also</a></li>
- </ul>
- </body>
- </html>
-