X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6d94998fcbdb3ce60774e38c0d4b6ee20c6798..760f0fc2f4b875beb06e5ecd6d69b891d8360efe:/docs/latex/wx/palette.tex diff --git a/docs/latex/wx/palette.tex b/docs/latex/wx/palette.tex index ded5bc1d29..f46329e085 100644 --- a/docs/latex/wx/palette.tex +++ b/docs/latex/wx/palette.tex @@ -1,22 +1,42 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Name: palette.tex +%% Purpose: wxPalette docs +%% Author: +%% Modified by: +%% Created: +%% RCS-ID: $Id$ +%% Copyright: (c) wxWidgets +%% License: wxWindows license +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \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. -TODO: topic overview for wxPalette. - +%TODO: topic overview for wxPalette. \wxheading{Derived from} \helpref{wxGDIObject}{wxgdiobject}\\ \helpref{wxObject}{wxobject} +\wxheading{Include files} + + + +\wxheading{Predefined objects} + +Objects: + +{\bf wxNullPalette} + \wxheading{See also} \helpref{wxDC::SetPalette}{wxdcsetpalette}, \helpref{wxBitmap}{wxbitmap} \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxPalette::wxPalette}\label{wxpaletteconstr} +\membersection{wxPalette::wxPalette}\label{wxpalettector} \func{}{wxPalette}{\void} @@ -48,7 +68,10 @@ red, blue or green component. \helpref{wxPalette::Create}{wxpalettecreate} -\membersection{wxPalette::\destruct{wxPalette}} +\perlnote{In wxPerl the third constructor form takes as parameters + 3 array references ( they must be of the same length ).} + +\membersection{wxPalette::\destruct{wxPalette}}\label{wxpalettedtor} \func{}{\destruct{wxPalette}}{\void} @@ -74,16 +97,22 @@ red, blue or green component. \wxheading{Return value} -TRUE if the creation was successful, FALSE otherwise. +true if the creation was successful, false otherwise. \wxheading{See also} -\helpref{wxPalette::wxPalette}{wxpaletteconstr} +\helpref{wxPalette::wxPalette}{wxpalettector} + +\membersection{wxPalette::GetColoursCount}\label{wxpalettegetcolourscount} + +\constfunc{int}{GetColoursCount}{\void} + +Returns number of entries in palette. \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. @@ -97,7 +126,7 @@ Returns a pixel value (index into the palette) for the given RGB values. \wxheading{Return value} -The nearest palette index. +The nearest palette index or {\tt wxNOT\_FOUND} for unexpected errors. \wxheading{See also} @@ -105,7 +134,7 @@ The nearest palette index. \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. @@ -122,17 +151,20 @@ Returns RGB values for a given palette index. \wxheading{Return value} -TRUE if the operation was successful. +true if the operation was successful. \wxheading{See also} \helpref{wxPalette::GetPixel}{wxpalettegetpixel} +\perlnote{In wxPerl this method takes only the {\tt pixel} parameter and + returns a 3-element list ( or the empty list upon failure ).} + \membersection{wxPalette::Ok}\label{wxpaletteok} \constfunc{bool}{Ok}{\void} -Returns TRUE if palette data is present. +Returns true if palette data is present. \membersection{wxPalette::operator $=$}\label{wxpaletteassignment} @@ -156,5 +188,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. - -