diff options
Diffstat (limited to 'html/en/func/color.html')
-rw-r--r-- | html/en/func/color.html | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/html/en/func/color.html b/html/en/func/color.html index fbd4b52..de8216a 100644 --- a/html/en/func/color.html +++ b/html/en/func/color.html @@ -36,19 +36,19 @@ CD_DARK_GRAY = (128,128,128) CD_GRAY = (192,192,192) </pre> <hr> - <pre class="function"><span class="mainFunction">long int <a name="cdEncodeColor">cdEncodeColor</a>(unsigned char red, unsigned char green, unsigned char blue) [in C]</span> + <div class="function"><pre class="function"><span class="mainFunction">long int <a name="cdEncodeColor">cdEncodeColor</a>(unsigned char red, unsigned char green, unsigned char blue) [in C]</span> cd.EncodeColor(r, g, b: number) -> (old_color: lightuserdata) [in Lua]</pre> <p>Returns a codified triple (<em>r,g,b</em>) in a long integer such as <b><tt>0x00RRGGBB</tt></b>, where <tt><b>RR</b> </tt>are the red components, <b><tt>GG</tt></b> are the green ones and <b><tt>BB</tt></b> are the blue ones. The code is used in the CD library to define colors. It can be used without an active canvas.</p> - <pre class="function"><span class="mainFunction">void <a name="cdDecodeColor">cdDecodeColor</a>(long int color, unsigned char *red, unsigned char *green, unsigned char *blue) [in C]</span> + </div><div class="function"><pre class="function"><span class="mainFunction">void <a name="cdDecodeColor">cdDecodeColor</a>(long int color, unsigned char *red, unsigned char *green, unsigned char *blue) [in C]</span> cd.DecodeColor(color: lightuserdata) -> (r, g, b: number) [in Lua]</pre> <p>Returns the red, green and blue components of a color in the CD library. Can be used without an active canvas.</p> - <pre class="function"><span class="mainFunction">long int <a name="cdEncodeAlpha">cdEncodeAlpha</a>(long int color, unsigned char alpha) [in C]</span> + </div><div class="function"><pre class="function"><span class="mainFunction">long int <a name="cdEncodeAlpha">cdEncodeAlpha</a>(long int color, unsigned char alpha) [in C]</span> cd.EncodeAlpha(color: lightuserdata, alpha: number) -> (color: lightuserdata) [in Lua]</pre> <p>Returns the given color coded with the alpha information. ATENTION: At the @@ -60,40 +60,40 @@ cd.EncodeAlpha(color: lightuserdata, alpha: number) -> (color: lightuserdata) must be 0 and opaque for backward compatibility, so you should use the <strong>cdDecodeAlpha</strong> function or the <strong>cdAlpha</strong> macro to retrieve the alpha component. 0 is transparent, 255 is opaque.</p> - <pre class="function"><span class="mainFunction">unsigned char <a name="cdDecodeAlpha">cdDecodeAlpha</a>(long int color) [in C]</span> + </div><div class="function"><pre class="function"><span class="mainFunction">unsigned char <a name="cdDecodeAlpha">cdDecodeAlpha</a>(long int color) [in C]</span> cd.DecodeAlpha(color: lightuserdata) -> (a: number) [in Lua]</pre> <p>Returns the alpha component of a color in the CD library. Can be used without an active canvas. 0 is transparent, 255 is opaque.</p> - <pre class="function"><span class="mainFunction">unsigned char <a name="cdRed0">cdAlpha</a>(long int color); [in C]</span> + </div><div class="function"><pre class="function"><span class="mainFunction">unsigned char <a name="cdRed0">cdAlpha</a>(long int color); [in C]</span> cd.Alpha(color: lightuserdata) -> (r: number) [in Lua]</pre> <p>Macro that returns the alpha component of a color in the CD library. Can be used without an active canvas.</p> - <pre class="function"><span class="mainFunction">unsigned char <a name="cdRed">cdRed</a>(long int color); [in C]</span> + </div><div class="function"><pre class="function"><span class="mainFunction">unsigned char <a name="cdRed">cdRed</a>(long int color); [in C]</span> cd.Red(color: lightuserdata) -> (r: number) [in Lua]</pre> <p>Macro that returns the red component of a color in the CD library. Can be used without an active canvas.</p> - <pre class="function"><span class="mainFunction">unsigned char <a name="cdGreen">cdGreen</a>(long int color); [in C]</span> + </div><div class="function"><pre class="function"><span class="mainFunction">unsigned char <a name="cdGreen">cdGreen</a>(long int color); [in C]</span> cd.Green(color: lightuserdata) -> (g: number) [in Lua]</pre> <p>Macro that returns the green component of a color in the CD library. Can be used without an active canvas.</p> - <pre class="function"><span class="mainFunction">unsigned char <a name="cdBlue">cdBlue</a>(long int color); [in C]</span> + </div><div class="function"><pre class="function"><span class="mainFunction">unsigned char <a name="cdBlue">cdBlue</a>(long int color); [in C]</span> cd.Blue(color: lightuserdata) -> (b: number) [in Lua]</pre> <p>Macro that returns the blue component of a color in the CD library. Can be used without an active canvas.</p> <hr> - <pre class="function"><span class="mainFunction">int <a name="cdGetColorPlanes">cdCanvasGetColorPlanes</a>(cdCanvas* canvas); [in C]</span> + </div><div class="function"><pre class="function"><span class="mainFunction">int <a name="cdGetColorPlanes">cdCanvasGetColorPlanes</a>(cdCanvas* canvas); [in C]</span> canvas:GetColorPlanes() -> (bpp: number) [in Lua]</pre> <p>Returns a given number, for instance <i>p</i>, which defines the number of colors supported by the current device as <i>2<sup>p</sup></i>, representing the number of bits by pixel. </p> - <pre class="function"><span class="mainFunction">void <a name="cdPalette">cdCanvasPalette</a>(cdCanvas* canvas, int n, const long int *color, int mode); [in C]</span> + </div><div class="function"><pre class="function"><span class="mainFunction">void <a name="cdPalette">cdCanvasPalette</a>(cdCanvas* canvas, int n, const long int *color, int mode); [in C]</span> canvas:Palette(palette: cdPalette; mode: number) [in Lua]</pre> <p>In systems limited to 256 palette colors, this function aims at adding <b><tt> @@ -104,15 +104,15 @@ canvas:Palette(palette: cdPalette; mode: number) [in Lua]</pre> since the menus and dialogues may be in illegible colors, but there will be more colors available. <tt><b>CD_POLITE</b></tt> is the recommended type. It must always be used before drawing. It cannot be queried.</p> - +</div> <h3><a name="Palette">Palette</a></h3> - <pre class="function"><a name="cdCreatePalette">cd.CreatePalette</a>(size: number) -> (palette: cdPalette) [in Lua Only]</pre> + <div class="function"><pre class="function"><a name="cdCreatePalette">cd.CreatePalette</a>(size: number) -> (palette: cdPalette) [in Lua Only]</pre> <p>Creates a palette.</p> - <pre class="function"><a name="cdKillPalette">cd.KillPalette</a>(palette: cdPalette) [in Lua Only]</pre> + </div><div class="function"><pre class="function"><a name="cdKillPalette">cd.KillPalette</a>(palette: cdPalette) [in Lua Only]</pre> <p>Destroys the created palette and liberates allocated memory. If this function is not called in Lua, the garbage collector will call it.</p> - +</div> <h3>Palette <a name="DataAccess">Data Access</a></h3> <p>Data access in Lua is done directly using the array access operators. The |