Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > e3918135d52936bad0ecc8654eedea12 > files > 449

Falcon-doc-0.9.6.8-1.fc15.noarch.rpm

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >
<head><meta content="text/html;charset=&amp;quot;utf-8&amp;quot;" http-equiv="Content-type"/><link href="faldoc.css" rel="stylesheet" type="text/css"/><title> - Class SDLPalette</title></head><body class="faldoc"><ul class="navi_top"><li class="top"><a href="index.html">Top: Table of contents</a></li>
         <li class="up"><a href="sdl.html">Up: The SDL Falcon Module.</a></li>
         <li class="prev"><a href="sdl_SDLMouseState.html">Previous: Class SDLMouseState</a></li>
         <li class="next"><a href="sdl_SDLPixelFormat.html">Next: Class SDLPixelFormat</a></li>
         <li class="clear"></li>
         </ul><div id="page_body"><h1><span class="toc_number">16.9</span>Class SDLPalette</h1><p class="brief">Represents the palette of a surface </p>
         <pre class="prototype">Class SDLPalette</pre>
         <table class="members">
         <tbody><tr class="member_type"><td class="member_type" colspan="2">Properties</td></tr>
               <tr><td><a href="#colors">colors</a></td><td> MemBuf of 4 byte elements containing each color entry.</td></tr>
               <tr><td><a href="#ncolors">ncolors</a></td><td> number of elements in the palette (equal to colors.</td></tr>
               </tbody>
            <tbody><tr class="member_type"><td class="member_type" colspan="2">Methods</td></tr>
               <tr><td><a href="#GetColor">GetColor</a></td><td>Gets a color in the image palette. </td></tr>
               <tr><td><a href="#SetColor">SetColor</a></td><td>Sets a color in the image palette. </td></tr>
               </tbody>
            </table>
         <h2>Properties</h2><h3><a name="colors">colors</a></h3><p class="brief"> MemBuf of 4 byte elements containing each color entry.</p>
         <p> MemBuf of 4 byte elements containing each color entry. </p>
<h3><a name="ncolors">ncolors</a></h3><p class="brief"> number of elements in the palette (equal to colors.</p>
         <p> number of elements in the palette (equal to colors.len() ) </p>
<h2>Methods</h2><h3><a name="GetColor">GetColor</a></h3><p class="brief">Gets a color in the image palette. </p>
         <pre class="prototype">SDLPalette.GetColor( colorIndex, [colArray] )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">colorIndex</td><td class="content"> Index of the color in the palette. </td></tr>
               <tr class="optparam"><td class="name">colArray</td><td class="content"> Array of that will hold red, green and blue values. </td></tr>
               <tr class="return"><td class="name">Return</td><td class="content">an array containing red, green and blue elements. </td></tr>
               <tr class="raise"><td class="name">Raise</td><td class="content"><table>
                     <tbody><tr><td class="name"><b>RangeError</b></td><td class="content"> if color index is out of range. </td></tr>
                           </tbody>
                        </table>
                     </td></tr>
               </tbody>
            </table>
         <p>An array can be provided as parameter to prevent re-allocation of the returned value. </p>
<h3><a name="SetColor">SetColor</a></h3><p class="brief">Sets a color in the image palette. </p>
         <pre class="prototype">SDLPalette.SetColor( colorIndex, red, [green],[blue] )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">colorIndex</td><td class="content"> Index of the color in the palette. </td></tr>
               <tr class="param"><td class="name">red</td><td class="content"> the Red value of the color to be set, or a three elements array with the three color values. </td></tr>
               <tr class="optparam"><td class="name">green</td><td class="content"> Green value of the element (not needed if red was an array). </td></tr>
               <tr class="optparam"><td class="name">blue</td><td class="content"> Blue value of the element (not needed if red was an array). </td></tr>
               <tr class="raise"><td class="name">Raise</td><td class="content"><table>
                     <tbody><tr><td class="name"><b>RangeError</b></td><td class="content"> if color index is out of range. </td></tr>
                           </tbody>
                        </table>
                     </td></tr>
               </tbody>
            </table>
         <p>Changes a value in the image palette </p>
</div><ul class="navi_bottom"><li class="top"><a href="index.html">Top: Table of contents</a></li>
         <li class="up"><a href="sdl.html">Up: The SDL Falcon Module.</a></li>
         <li class="prev"><a href="sdl_SDLMouseState.html">Previous: Class SDLMouseState</a></li>
         <li class="next"><a href="sdl_SDLPixelFormat.html">Next: Class SDLPixelFormat</a></li>
         <li class="clear"></li>
         </ul><div class="signature">Made with <a href="faldoc 3.0">http://www.falconpl.org</a></div></body></html>