From 7b52cc13af4e85f1ca2deb6b6c77de9c95ea0dcf Mon Sep 17 00:00:00 2001 From: scuri Date: Fri, 17 Oct 2008 06:10:33 +0000 Subject: First commit - moving from LuaForge to SourceForge --- html/en/func/attributes.html | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 html/en/func/attributes.html (limited to 'html/en/func/attributes.html') 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 @@ + + + + General Attributes + + + + + +

General Attributes

+
long int cdCanvasForeground(cdCanvas* canvas, long int color); [in C]
+void cdCanvasSetForeground(cdCanvas* canvas, long int color); [in C]
+
+canvas:Foreground(color: lightuserdata) -> (old_color: lightuserdata) [in Lua]
+canvas:SetForeground(color: lightuserdata) [in Lua]
+

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: + CD_BLACK. Value CD_QUERY simply returns the + current value.

+

Notice that CD_QUERY conflicts with color RGBA=(255,255,255,255) (full + transparent white). Use SetForeground to avoid the + conflict. See also Color Coding.

+
long int cdCanvasBackground(cdCanvas* canvas, long int color); [in C]
+void cdCanvasSetBackground(cdCanvas* canvas, long int color); [in C]
+
+canvas:Background(color: lightuserdata) -> (old_color: lightuserdata) [in Lua]
+canvas:SetBackground(color: lightuserdata) [in Lua]
+

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 Clear function. The + background color only makes sense for Clear and for + primitives affected by the background opacity attribute. Default value: CD_WHITE. + Value CD_QUERY simply returns the current value.

+

Notice that CD_QUERY conflicts with color RGBA=(255,255,255,255) (full + transparent white). Use SetBackground to avoid the + conflict. See also Color Coding.

+
int cdCanvasWriteMode(cdCanvas* canvas, int mode); [in C]
+
+canvas:WriteMode(mode: number) -> (old_mode: number) [in Lua]
+

Defines the writing type for all drawing primitives. Values: CD_REPLACE, + CD_XOR or CD_NOT_XOR. Returns the previous + value. Default value: CD_REPLACE. Value CD_QUERY + simply returns the current value. +

+

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.

+ + -- cgit v1.2.3