diff options
author | scuri <scuri> | 2009-10-16 20:20:09 +0000 |
---|---|---|
committer | scuri <scuri> | 2009-10-16 20:20:09 +0000 |
commit | bc2a19199ee23eb9c416c8bc4a5553ca3828f8f0 (patch) | |
tree | d71d00f56a4618205fc4480af8c18854f81b3976 /html | |
parent | 260844b45c6eedf8e3a1471354074be9ce59e693 (diff) |
*** empty log message ***
Diffstat (limited to 'html')
-rw-r--r-- | html/en/imlua.html | 87 |
1 files changed, 47 insertions, 40 deletions
diff --git a/html/en/imlua.html b/html/en/imlua.html index 651d472..d9489f9 100644 --- a/html/en/imlua.html +++ b/html/en/imlua.html @@ -1,10 +1,11 @@ -<html> +<html> <head> <meta name="GENERATOR" content="Microsoft FrontPage 12.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Language" content="en-us"> <title>Lua Binding</title> +<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> <link rel="stylesheet" type="text/css" href="../style.css"> </head> @@ -15,30 +16,31 @@ <p> All the IM functions are available in Lua, with a few exceptions. We call it <strong> - ImLua</strong>. To use them the general application will do require"imlua", - and require"imluaxxxx" to all other secondary libraries that are needed. The functions - and definitions will be available under the table "im" using the following name - rules:</p> - <pre>imXxx -> im.Xxx (for functions)<br />IM_XXX -> im.XXX (for definitions)<br />imFileXXX(ifile,... -> ifile:XXX(... (for methods) + ImLua</strong>. To use them the general application will do + require"imlua", and require"imluaxxxx" to all other secondary libraries that + are needed. The functions and definitions will be available under the table + "im" using the following name rules:</p> + <pre>imXxx -> im.Xxx (for functions)<br />IM_XXX -> im.XXX (for definitions)<br />imFileXXX(ifile,... -> ifile:XXX(... (for methods) imImageXXX(image,... -> image:XXX(... (for methods)<br /></pre> <p> - New functions (without equivalents in C) were implemented to create and destroy - objects that do not exist in C. For instance functions were developed - to create and destroy palettes. - All the metatables have the "tostring" - metamethod implemented to help debuging. The <strong>imImage</strong> metatable has the "index" metamethod - so you can address its data directly in Lua. Some functions were modified to receive - those objects as parameters.</p> + New functions (without equivalents in C) were implemented to create and + destroy objects that do not exist in C. For instance functions were + developed to create and destroy palettes. All the metatables have the + "tostring" metamethod implemented to help debuging. The <strong>imImage</strong> + metatable has the "index" metamethod so you can address its data + directly in Lua. Some functions were modified to receive those objects + as parameters.</p> <p> - Also the functions which receive values by reference in C were modified. Generally, - the values of parameters that would have their values modified are now returned - by the function in the same order.</p> + Also the functions which receive values by reference in C were modified. + Generally, the values of parameters that would have their values + modified are now returned by the function in the same order.</p> <p> - Notice that, as opposed to C, in which enumeration flags are<i> </i>combined with - the bitwise operator OR, in Lua the flags are added arithmetically.</p> + Notice that, as opposed to C, in which enumeration flags are<i> </i> + combined with the bitwise operator OR, in Lua the flags are added + arithmetically.</p> <p> - In Lua -all parameters are checked and a Lua error is emitted when the check fails.</p> + In Lua all parameters are checked and a Lua error is emitted when the + check fails.</p> <p> All the objects are garbage collected by the Lua garbage collector. </p> <p> @@ -48,27 +50,29 @@ all parameters are checked and a Lua error is emitted when the check fails.</p> <h3> Initialization</h3> <p> - <strong>Lua</strong> 5.1 "require" can be used for all the <strong>ImLua</strong> - libraries. You can use <b>require</b>"<b>imlua</b>" and so on, but the LUA_CPATH - must also contains the following: + <strong>Lua</strong> 5.1 "require" can be used for all the <strong>ImLua</strong> + libraries. You can use <b>require</b>"<b>imlua</b>" and so on, but the + LUA_CPATH must also contains the following: </p> - <pre>"./lib?51.so;" [in UNIX] + <pre>"./lib?51.so;" [in UNIX] -".\\?51.dll;" [in Windows] +".\\?51.dll;" [in Windows] </pre> <p> - The <a href="http://luabinaries.luaforge.net/">LuaBinaries</a> distribution already - includes these modifications on the default search path.</p> + The <a href="http://luabinaries.luaforge.net/">LuaBinaries</a> + distribution already includes these modifications on the default search + path.</p> <p> - The simplest form <b>require</b>"<b>im</b>" and so on, can not be used because there - are IM dynamic libraries with names that will conflict with the names used by <b>require</b> + The simplest form <b>require</b>"<b>im</b>" and so on, can not be used + because there are IM dynamic libraries with names that will conflict + with the names used by <b>require</b> during search.</p> <p> - Additionally you can statically link the <strong>ImLua</strong> libraries, but you - must call the initialization functions manually. The <strong><font face="Courier New"> + Additionally you can statically link the <strong>ImLua</strong> + libraries, but you must call the initialization functions manually. The <strong><font face="Courier New"> imlua_open</font></strong> function is declared in the header file <strong><font - face="Courier New">imlua</font><font face="Courier New" size="2">.</font><font face="Courier New">h</font></strong>, - see the example below:</p> + face="Courier New">imlua</font><font face="Courier New" size="2">.</font><font face="Courier New">h</font></strong>, + see the example below:</p> <div align="center"> <center> @@ -101,17 +105,20 @@ all parameters are checked and a Lua error is emitted when the check fails.</p> <h3><a name="Integration with ImLua">Integration with CDLua</a></h3> - <p>In <b>CDLua</b> there is an additional library providing simple functions to map the + <p>In <b>CDLua</b> there is an additional library providing simple functions + to map the <strong>imImage</strong> - structure to the <strong>cdBitmap</strong> structure. And some facilities to - draw an image in a CD canvas. See also the <a target="_blank" href="http://www.tecgraf.puc-rio.br/cd">CD documentation</a> and - the <a href="doxygen/group__imlua.html">IM Lua 5 Binding</a> reference.</p> - <p>Color values and palettes can be created and used transparently in both libraries. Palettes and color values are - 100% compatible between CD and IM.</p> + structure to the <strong>cdBitmap</strong> structure. And some facilities to + draw an image in a CD canvas. See also the <a target="_blank" href="http://www.tecgraf.puc-rio.br/cd"> + CD documentation</a> and the <a href="doxygen/group__imlua.html">IM Lua 5 + Binding</a> reference.</p> + <p>Color values and palettes can be created and used transparently in both + libraries. Palettes and color values are 100% compatible between CD and IM.</p> <h3> Reference</h3> <p> - See also the <a href="doxygen/group__imlua.html">ImLua 5 Binding Reference</a><span + See also the <a href="doxygen/group__imlua.html">ImLua 5 Binding + Reference</a><span style="color: #ff0000">.</span></p> |