1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
<html>
<head>
<title>EAGLE Help: palette()</title>
</head>
<body bgcolor=white>
<font face=Helvetica,Arial>
<hr>
<i>EAGLE Help</i>
<h1><center>palette()</center></h1>
<hr>
<dl>
<dt>
<b>Function</b>
<dd>
Returns color palette information.
<p>
<dt>
<b>Syntax</b>
<dd>
<tt>int palette(int index[, int type]);</tt>
<p>
<dt>
<b>Returns</b>
<dd>
The <tt>palette</tt> function returns an integer RGB value in the form 0x00rrggbb,
or the type of the currently used palette (depending on the value of <tt>index</tt>).
<p>
<dt>
<b>Description</b>
<dd>
The <tt>palette</tt> function returns the RGB value of the color with the given
<tt>index</tt> (which may be in the range 0..PALETTE_ENTRIES-1). If <tt>type</tt> is not
given (or is <tt>-1</tt>) the palette assigned to the current editor window will
be used. Otherwise <tt>type</tt> specifies which color palette to use (PALETTE_BLACK,
PALETTE_WHITE or PALETTE_COLORED).
<p>
The special value <tt>-1</tt> for <tt>index</tt> makes the function return the type
of the palette that is currently in use by the editor window.
<p>
If either <tt>index</tt> or <tt>type</tt> is out of range, an error message will be
given and the ULP will be terminated.
</dl>
<p>
<b>Constants</b>
<p>
<table>
<tr><td valign=top><font face=Helvetica,Arial><tt>PALETTE_TYPES</tt> </font></td><td valign=top><font face=Helvetica,Arial>the number of palette types (3)</font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>PALETTE_BLACK</tt> </font></td><td valign=top><font face=Helvetica,Arial>the black background palette (0)</font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>PALETTE_WHITE</tt> </font></td><td valign=top><font face=Helvetica,Arial>the white background palette (1)</font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>PALETTE_COLORED</tt> </font></td><td valign=top><font face=Helvetica,Arial>the colored background palette (2)</font></td></tr>
<tr><td valign=top><font face=Helvetica,Arial><tt>PALETTE_ENTRIES</tt> </font></td><td valign=top><font face=Helvetica,Arial>the number of colors per palette (64)</font></td></tr>
</table>
<hr>
<table width=100% cellspacing=0 border=0><tr><td align=left><font face=Helvetica,Arial>
<a href=index.htm>Index</a>
</font></td><td align=right><font face=Helvetica,Arial size=-1>
<i>Copyright © 2005 CadSoft Computer GmbH</i>
</font></td></tr></table>
<hr>
</font>
</body>
</html>
|