diff options
author | scuri <scuri> | 2008-10-17 06:10:33 +0000 |
---|---|---|
committer | scuri <scuri> | 2008-10-17 06:10:33 +0000 |
commit | 7b52cc13af4e85f1ca2deb6b6c77de9c95ea0dcf (patch) | |
tree | d0857278bde2eff784227c57dcaf930346ceb7ac /html/en/func/attributes.html |
First commit - moving from LuaForge to SourceForge
Diffstat (limited to 'html/en/func/attributes.html')
-rw-r--r-- | html/en/func/attributes.html | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/html/en/func/attributes.html b/html/en/func/attributes.html new file mode 100644 index 0000000..60768e4 --- /dev/null +++ b/html/en/func/attributes.html @@ -0,0 +1,49 @@ +<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> + <head> + <title>General Attributes</title> + <meta http-equiv="Content-Language" content="en-us"> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <link rel="stylesheet" type="text/css" href="../../style.css"> + </head> + <body> + <h2 align="center">General Attributes</h2> + <pre class="function"><span class="mainFunction">long int <a name="cdForeground">cdCanvasForeground</a>(cdCanvas* canvas, long int color); [in C]</span> +void cdCanvasSetForeground(cdCanvas* canvas, long int color); [in C] + +canvas:Foreground(color: lightuserdata) -> (old_color: lightuserdata) [in Lua] +canvas:SetForeground(color: lightuserdata) [in Lua]</pre> + <p>Configures a new current foreground color and returns the previous one. This + color is used in all primitives (lines, areas, marks and text). Default value: <b> + <tt>CD_BLACK</tt></b>. Value <tt><b>CD_QUERY</b> </tt>simply returns the + current value.</p> + <p>Notice that CD_QUERY conflicts with color RGBA=(255,255,255,255) (full + transparent white). Use <strong>SetForeground</strong> to avoid the + conflict. See also <a href="color.html">Color Coding</a>.</p> + <pre class="function"><span class="mainFunction">long int <a name="cdBackground">cdCanvasBackground</a>(cdCanvas* canvas, long int color); [in C]</span> +void cdCanvasSetBackground(cdCanvas* canvas, long int color); [in C] + +canvas:Background(color: lightuserdata) -> (old_color: lightuserdata) [in Lua] +canvas:SetBackground(color: lightuserdata) [in Lua]</pre> + <p>Configures the new current background color and returns the previous one. + However, it does not automatically change the background of a canvas. For such, + it is necessary to call the <strong>Clear</strong> function. The + background color only makes sense for <strong>Clear</strong><tt><font> </font></tt>and for + primitives affected by the background opacity attribute. Default value: <b><tt>CD_WHITE</tt></b>. + Value <tt><b>CD_QUERY</b> </tt>simply returns the current value.</p> + <p>Notice that CD_QUERY conflicts with color RGBA=(255,255,255,255) (full + transparent white). Use <strong>SetBackground</strong> to avoid the + conflict. See also <a href="color.html">Color Coding</a>.</p> + <pre class="function"><span class="mainFunction">int <a name="cdWriteMode">cdCanvasWriteMode</a>(cdCanvas* canvas, int mode); [in C]</span> + +canvas:WriteMode(mode: number) -> (old_mode: number) [in Lua]</pre> + <p>Defines the writing type for all drawing primitives. Values: <b><tt>CD_REPLACE</tt></b>, + <b><tt>CD_XOR</tt></b> or <b><tt>CD_NOT_XOR</tt></b>. Returns the previous + value. Default value: <b><tt>CD_REPLACE</tt></b>. Value <tt><b>CD_QUERY</b> </tt> + simply returns the current value. + </p> + <p>Note: operation XOR is very useful, because, using white as the foreground + color and drawing the same image twice, you can go back to the original color, + before the drawing. This is commonly used for mouse selection feedback.</p> + </body> +</html> |