diff docs/html/sdlpixelformat.html @ 55:55f1f1b3e27d

Added new docs for SDL 1.2.1
author Sam Lantinga <slouken@lokigames.com>
date Sun, 10 Jun 2001 19:31:57 +0000
parents 74212992fb08
children e5bc29de3f0a
line wrap: on
line diff
--- a/docs/html/sdlpixelformat.html	Sun Jun 10 18:39:47 2001 +0000
+++ b/docs/html/sdlpixelformat.html	Sun Jun 10 19:31:57 2001 +0000
@@ -4,7 +4,7 @@
 >SDL_PixelFormat</TITLE
 ><META
 NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.61
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
 "><LINK
 REL="HOME"
 TITLE="SDL Library Documentation"
@@ -73,7 +73,7 @@
 ><DIV
 CLASS="REFNAMEDIV"
 ><A
-NAME="AEN2677"
+NAME="AEN2756"
 ></A
 ><H2
 >Name</H2
@@ -81,7 +81,7 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN2680"
+NAME="AEN2759"
 ></A
 ><H2
 >Structure Definition</H2
@@ -101,14 +101,14 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN2683"
+NAME="AEN2762"
 ></A
 ><H2
 >Structure Data</H2
 ><DIV
 CLASS="INFORMALTABLE"
 ><A
-NAME="AEN2685"
+NAME="AEN2764"
 ></A
 ><P
 ></P
@@ -258,7 +258,7 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN2724"
+NAME="AEN2803"
 ></A
 ><H2
 >Description</H2
@@ -383,7 +383,13 @@
 .</PRE
 ></P
 ><P
->Pixel formats above 8-bit are an entirely different experience. They are considered to be "TrueColor" formats and the color information is stored in the pixels themselves, not in a palette (packed-pixel). The mask, shift and loss fields tell us how the color information is encoded. The mask fields allow us to isolate each color component, the shift fields tell us how far left we have to shift the masked value and the loss fields tell us for far right we have to shift the final value to convert it to a full 8-bit color component.
+>Pixel formats above 8-bit are an entirely different experience. They are
+considered to be "TrueColor" formats and the color information is stored in the
+pixels themselves, not in a palette. The mask, shift and loss fields tell us
+how the color information is encoded. The mask fields allow us to isolate each
+color component, the shift fields tell us the number of bits to the right of
+each component in the pixel value and the loss fields tell us the number of
+bits lost from each component when packing 8-bit color component in a pixel.
 <PRE
 CLASS="PROGRAMLISTING"
 >/* Extracting color components from a 32-bit color value */
@@ -396,7 +402,7 @@
 .
 fmt=surface-&#62;format;
 SDL_LockSurface(surface);
-pixel=(Uint32*)surface-&#62;pixels;
+pixel=*((Uint32*)surface-&#62;pixels);
 SDL_UnlockSurface(surface);
 
 /* Get Red component */
@@ -432,7 +438,7 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN2751"
+NAME="AEN2830"
 ></A
 ><H2
 >See Also</H2