Differences between current version and predecessor to the previous major change of SDL_PixelFormat(3).
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 2 | Last edited on Monday, June 3, 2002 6:53:47 pm | by perry | |
Older page: | version 1 | Last edited on Monday, June 3, 2002 6:53:47 pm | by perry | Revert |
@@ -1,6 +1,6 @@
-SDL_PixelFormat
-!!!SDL_PixelFormat
+SDL_!
PixelFormat
+!!!SDL_!
PixelFormat
NAME
STRUCTURE DEFINITION
STRUCTURE DATA
DESCRIPTION
@@ -8,35 +8,35 @@
----
!!NAME
-SDL_PixelFormat- Stores surface format information
+SDL_!
PixelFormat- Stores surface format information
!!STRUCTURE DEFINITION
typedef struct{
SDL_Palette *palette;
-Uint8 BitsPerPixel;
-Uint8 BytesPerPixel;
+Uint8 !
BitsPerPixel;
+Uint8 !
BytesPerPixel;
Uint32 Rmask, Gmask, Bmask, Amask;
Uint8 Rshift, Gshift, Bshift, Ashift;
Uint8 Rloss, Gloss, Bloss, Aloss;
Uint32 colorkey;
Uint8 alpha;
-} SDL_PixelFormat;
+} SDL_!
PixelFormat;
!!STRUCTURE DATA
__palette__ Pointer to the ''palette'', or __NULL__
-if the __BitsPerPixel____
+if the __!
BitsPerPixel____
-__BitsPerPixel__ The number of bits used to represent
+__!
BitsPerPixel__ The number of bits used to represent
each pixel in a surface. Usually 8, 16, 24 or
32.
-__BytesPerPixel__
+__!
BytesPerPixel__
The number of bytes used to represent each pixel in a
surface. Usually one to four.
@@ -61,12 +61,12 @@
__alpha__ Overall surface alpha value
!!DESCRIPTION
-A __SDL_PixelFormat__ describes the format of the pixel
+A __SDL_!
PixelFormat__ describes the format of the pixel
data stored at the __pixels__ field of a
__SDL_Surface__. Every surface stores a
-__SDL_PixelFormat__ in the __format__
+__SDL_!
PixelFormat__ in the __format__
field.
If you wish to do pixel level modifications on a surface,
@@ -74,10 +74,10 @@
essential.
8-bit pixel formats are the easiest to understand. Since its
-an 8-bit format, we have 8 __BitsPerPixel__ and 1
-__BytesPerPixel__. Since __BytesPerPixel__ is 1, all
+an 8-bit format, we have 8 __!
BitsPerPixel__ and 1
+__!
BytesPerPixel__. Since __!
BytesPerPixel__ is 1, all
pixels are represented by a Uint8 which contains an index
into __palette__-__colors__. So, to determine the
color of a pixel in a 8-bit surface: we read the color index
from __surface__-__pixels__ and we use that index
@@ -86,9 +86,9 @@
Like so:
SDL_Surface *surface;
-SDL_PixelFormat *fmt;
+SDL_!
PixelFormat *fmt;
SDL_Color *color;
Uint8 index;
.
.
@@ -102,9 +102,9 @@
experience. They are considered to be
/* Extracting color components from a 32-bit color value */
-SDL_PixelFormat *fmt;
+SDL_!
PixelFormat *fmt;
SDL_Surface *surface;
Uint32 temp, pixel;
Uint8 red, green, blue, alpha;
.