comparison docs/man3/SDL_Surface.3 @ 0:74212992fb08

Initial revision
author Sam Lantinga <slouken@lokigames.com>
date Thu, 26 Apr 2001 16:45:43 +0000
parents
children 55f1f1b3e27d
comparison
equal deleted inserted replaced
-1:000000000000 0:74212992fb08
1 .TH "SDL_Surface" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference"
2 .SH "NAME"
3 SDL_Surface\- Graphical Surface Structure
4 .SH "STRUCTURE DEFINITION"
5 .PP
6 .nf
7 \f(CWtypedef struct SDL_Surface {
8 Uint32 flags; /* Read-only */
9 SDL_PixelFormat *format; /* Read-only */
10 int w, h; /* Read-only */
11 Uint16 pitch; /* Read-only */
12 void *pixels; /* Read-write */
13 int offset; /* Private */
14
15 /* Hardware-specific surface info */
16 struct private_hwdata *hwdata;
17
18 /* clipping information */
19 SDL_Rect clip_rect; /* Read-only */
20 Uint32 unused1; /* for binary compatibility */
21 Uint32 unused2; /* for binary compatibility */
22
23 /* info for fast blit mapping to other surfaces */
24 struct SDL_BlitMap *map; /* Private */
25
26 /* format version, bumped at every change to invalidate blit maps */
27 unsigned int format_version; /* Private */
28
29 /* Reference count -- used when freeing surface */
30 int refcount; /* Read-mostly */
31 } SDL_Surface;\fR
32 .fi
33 .PP
34 .SH "STRUCTURE DATA"
35 .TP 20
36 \fBflags\fR
37 Surface flags
38 .TP 20
39 \fBformat\fR
40 Pixel \fIformat\fR
41 .TP 20
42 \fBw, h\fR
43 Width and height of the surface
44 .TP 20
45 \fBpitch\fR
46 Length of a surface scanline in bytes
47 .TP 20
48 \fBpixels\fR
49 Pointer to the actual pixel data
50 .TP 20
51 \fBclip_minx, clip_maxx\fR
52 X clip coords
53 .TP 20
54 \fBclip_rect\fR
55 surface clip \fIrectangle\fR
56 .SH "DESCRIPTION"
57 .PP
58 \fBSDL_Surface\fR\&'s represent areas of "graphical" memory, memory that can be drawn to\&. The video framebuffer is returned as a \fBSDL_Surface\fR by \fI\fBSDL_SetVideoMode\fP\fR and \fI\fBSDL_GetVideoSurface\fP\fR\&. Most of the fields should be pretty obvious\&. \fBw\fR and \fBh\fR are the width and height of the surface in pixels\&. \fBpixels\fR is a pointer to the actual pixel data, the surface should be \fIlocked\fR before accessing this field\&. The \fBclip_rect\fR field is the clipping rectangle as set by \fI\fBSDL_SetClipRect\fP\fR\&.
59 .PP
60 The following are supported in the \fBflags\fR field\&.
61 .TP 20
62 \fBSDL_SWSURFACE\fP
63 Surface is stored in system memory
64 .TP 20
65 \fBSDL_HWSURFACE\fP
66 Surface is stored in video memory
67 .TP 20
68 \fBSDL_ASYNCBLIT\fP
69 Surface uses asynchronous blits if possible
70 .TP 20
71 \fBSDL_ANYFORMAT\fP
72 Allows any pixel-format (Display surface)
73 .TP 20
74 \fBSDL_HWPALETTE\fP
75 Surface has exclusive palette
76 .TP 20
77 \fBSDL_DOUBLEBUF\fP
78 Surface is double buffered (Display surface)
79 .TP 20
80 \fBSDL_FULLSCREEN\fP
81 Surface is full screen (Display Surface)
82 .TP 20
83 \fBSDL_OPENGL\fP
84 Surface has an OpenGL context (Display Surface)
85 .TP 20
86 \fBSDL_OPENGLBLIT\fP
87 Surface supports OpenGL blitting (Display Surface)
88 .TP 20
89 \fBSDL_RESIZABLE\fP
90 Surface is resizable (Display Surface)
91 .TP 20
92 \fBSDL_HWACCEL\fP
93 Surface blit uses hardware acceleration
94 .TP 20
95 \fBSDL_SRCOLORKEY\fP
96 Surface use colorkey blitting
97 .TP 20
98 \fBSDL_RLEACCEL\fP
99 Colorkey blitting is accelerated with RLE
100 .TP 20
101 \fBSDL_SRCALPHA\fP
102 Surface blit uses alpha blending
103 .TP 20
104 \fBSDL_PREALLOC\fP
105 Surface uses preallocated memory
106 .SH "SEE ALSO"
107 .PP
108 \fI\fBSDL_PixelFormat\fR\fR
109 ...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04