<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<!-- THIS FILE IS GENERATED DO NOT EDIT -->


<erlref>
<header>
  <copyright>
    <year>2020</year>
    <holder>Ericsson AB. All Rights Reserved.</holder></copyright>
  <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

  </legalnotice>
  <title>wxPalette</title>
</header>
<module>wxPalette</module>
<modulesummary>Functions for wxPalette class</modulesummary>
<description><p>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.
      </p><p>It is likely that in the future the only use for palettes within wxWidgets will be for representing colour indices 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 <seeerl marker="wxImage"><c>wxImage</c></seeerl> for more information.
      </p><p>Predefined objects/pointers: ?wxNullPalette
      </p><p>See: <seemfa marker="wxDC#setPalette/2"><c>wxDC:setPalette/2</c></seemfa>, <seeerl marker="wxBitmap"><c>wxBitmap</c></seeerl>
      </p>
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_palette.html">wxPalette</url></p>
  </description>
<datatypes><datatype><name name="wxPalette"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>Default constructor. </fsummary>
    <desc><p>Default constructor. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="1" clause_i="1" since=""/>
    <fsummary>Copy constructor, uses overview_refcount. </fsummary>
    <desc><p>Copy constructor, uses overview_refcount. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="3" clause_i="1" since=""/>
    <fsummary>Creates a palette from arrays of size <c>n</c>, one for each red, blue or green component. </fsummary>
    <desc><p>Creates a palette from arrays of size <c>n</c>, one for each red, blue or green component. 
      </p><p>See: <seemfa marker="#create/4"><c>create/4</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Destructor. </fsummary>
    <desc><p>Destructor. 
      </p><p>See: reference-counted object destruction
      </p></desc>
  </func>
  
  <func>
    <name name="create" arity="4" clause_i="1" since=""/>
    <fsummary>Creates a palette from arrays of size <c>n</c>, one for each red, blue or green component. </fsummary>
    <desc><p>Creates a palette from arrays of size <c>n</c>, one for each red, blue or green component. 
      </p><p>Return: true if the creation was successful, false otherwise.
      </p><p>See: <seemfa marker="#new/3"><c>new/3</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getColoursCount" arity="1" clause_i="1" since=""/>
    <fsummary>Returns number of entries in palette. </fsummary>
    <desc><p>Returns number of entries in palette. 
      </p></desc>
  </func>
  
  <func>
    <name name="getPixel" arity="4" clause_i="1" since=""/>
    <fsummary>Returns a pixel value (index into the palette) for the given RGB values. </fsummary>
    <desc><p>Returns a pixel value (index into the palette) for the given RGB values. 
      </p><p>Return: The nearest palette index or <c>wxNOT_FOUND</c> for unexpected errors.
      </p><p>See: <seemfa marker="#getRGB/2"><c>getRGB/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getRGB" arity="2" clause_i="1" since=""/>
    <fsummary>Returns RGB values for a given palette index. </fsummary>
    <desc><p>Returns RGB values for a given palette index. 
      </p><p>Return: true if the operation was successful.
      </p><p>See: <seemfa marker="#getPixel/4"><c>getPixel/4</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="ok" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>isOk/1</c></fsummary>
    <desc><p>See: <seemfa marker="#isOk/1"><c>isOk/1</c></seemfa>.</p>
    </desc>
  </func>
  
  <func>
    <name name="isOk" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if palette data is present. </fsummary>
    <desc><p>Returns true if palette data is present. 
      </p></desc>
  </func>
  </funcs>
</erlref>
