]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/palette.tex
GetWxObjectPtr() returns wxObject*, not void*.
[wxWidgets.git] / docs / latex / wx / palette.tex
index ab37cf331761ab2d325a52b0dceef69b9ba3ef39..2b2eeefbac80ce119d43ad4fb1da6f886299e7a9 100644 (file)
@@ -1,7 +1,28 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Name:        palette.tex
+%% Purpose:     wxPalette docs
+%% Author:
+%% Modified by:
+%% Created:
+%% RCS-ID:      $Id$
+%% Copyright:   (c) wxWidgets
+%% License:     wxWindows license
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
 \section{\class{wxPalette}}\label{wxpalette}
 
 \section{\class{wxPalette}}\label{wxpalette}
 
-A palette is a table that maps pixel values to RGB colours. It allows the colours
-of a low-depth bitmap, for example, to be mapped to the available colours in a display.
+A palette is a table that maps pixel values to RGB colours. It allows the
+colours of a low-depth bitmap, for example, to be mapped to the available
+colours in a display. The notion of palettes is becoming more and more
+obsolete nowadays and only the MSW port is still using a native palette.
+All other ports use generic code which is basically just an array of
+colours. 
+
+It is likely that in the future the only use for palettes within wxWidgets
+will be for representing colour indeces from images (such as GIF or PNG).
+The image handlers for these formats have been modified to create a palette
+if there is such information in the original image file (usually 256 or less
+colour images). See \helpref{wxImage}{wximage} for more information.
 
 %TODO: topic overview for wxPalette.
 \wxheading{Derived from}
 
 %TODO: topic overview for wxPalette.
 \wxheading{Derived from}
@@ -100,8 +121,8 @@ Returns number of entries in palette.
 
 \membersection{wxPalette::GetPixel}\label{wxpalettegetpixel}
 
 
 \membersection{wxPalette::GetPixel}\label{wxpalettegetpixel}
 
-\constfunc{int}{GetPixel}{\param{const unsigned char }{red}, \param{const unsigned char }{green},\rtfsp
- \param{const unsigned char }{blue}}
+\constfunc{int}{GetPixel}{\param{unsigned char }{red}, \param{unsigned char }{green},\rtfsp
+ \param{unsigned char }{blue}}
 
 Returns a pixel value (index into the palette) for the given RGB values.
 
 
 Returns a pixel value (index into the palette) for the given RGB values.
 
@@ -115,7 +136,7 @@ Returns a pixel value (index into the palette) for the given RGB values.
 
 \wxheading{Return value}
 
 
 \wxheading{Return value}
 
-The nearest palette index.
+The nearest palette index or {\tt wxNOT\_FOUND} for unexpected errors.
 
 \wxheading{See also}
 
 
 \wxheading{See also}
 
@@ -123,7 +144,7 @@ The nearest palette index.
 
 \membersection{wxPalette::GetRGB}\label{wxpalettegetrgb}
 
 
 \membersection{wxPalette::GetRGB}\label{wxpalettegetrgb}
 
-\constfunc{bool}{GetPixel}{\param{int}{ pixel}, \param{const unsigned char* }{red}, \param{const unsigned char* }{green},\rtfsp
+\constfunc{bool}{GetRGB}{\param{int}{ pixel}, \param{const unsigned char* }{red}, \param{const unsigned char* }{green},\rtfsp
  \param{const unsigned char* }{blue}}
 
 Returns RGB values for a given palette index.
  \param{const unsigned char* }{blue}}
 
 Returns RGB values for a given palette index.
@@ -177,5 +198,3 @@ fail the test.
 
 Inequality operator. Two palettes are not equal if they contain pointers
 to different underlying palette data. It does not compare each attribute.
 
 Inequality operator. Two palettes are not equal if they contain pointers
 to different underlying palette data. It does not compare each attribute.
-
-