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/other.html |
First commit - moving from LuaForge to SourceForge
Diffstat (limited to 'html/en/func/other.html')
-rw-r--r-- | html/en/func/other.html | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/html/en/func/other.html b/html/en/func/other.html new file mode 100644 index 0000000..f0d7284 --- /dev/null +++ b/html/en/func/other.html @@ -0,0 +1,119 @@ +<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> + +<head> +<meta http-equiv="Content-Language" content="en-us"> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<title>Other</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2 align="center">System</h2> +<pre class="function"><span class="mainFunction">char* <a name="cdVersion">cdVersion</a>(void); [in C]</span> + +cd.Version() -> (version: string) [in Lua]</pre> + + <p>Returns the current version number of the library. The string with the + version number has a format "<font>major.minor.build</font>". + For instance, the string "2.1.3" has number 2 as the main (major) version + number, 1 as the secondary (minor) version number, and 3 as the build number. + The major version number represents a change in the structure or behavior of + functions; the minor version number represents one or more new drivers and + functions added to the library; and the build version number represents one or + more corrected bugs.</p> + +<pre class="function"><span class="mainFunction">char* cdVersionDate(void); [in C] +</span> +cd.VersionDate() -> (versiondate: string) [in Lua]</pre> +<p>Returns the release date of the current version of the library.</p> +<pre class="function"><span class="mainFunction">int cdVersionNumber(void); [in C] +</span> +cd.VersionNumber() -> (version: number) [in Lua]</pre> +<p>Returns the current version number of the library.</p> +<pre class="function">[in C] +<span class="mainFunction">CD_NAME</span> "CD - Canvas Draw" +<span class="mainFunction">CD_DESCRIPTION</span> "A 2D Graphics Library" +<span class="mainFunction">CD_COPYRIGHT</span> "Copyright (C) 1994-2007 Tecgraf/PUC-Rio and PETROBRAS S/A" +<span class="mainFunction">CD_VERSION</span> "5.0.0" +<span class="mainFunction">CD_VERSION_DATE</span> "2007/04/09" +<span class="mainFunction">CD_VERSION_NUMBER</span> 500000 + +[in Lua] +cd._NAME +cd._DESCRIPTION +cd._COPYRIGHT +cd._VERSION +cd._VERSION_DATE +cd._VERSION_NUMBER</pre> + + <p>Usefull definitions. They have the same value returned by <b>cdVersion</b>* + functions.</p> + +<hr> +<h2 align="center">Metafile Interpretation</h2> +<pre class="function"><span class="mainFunction">int cdCanvasPlay(cdCanvas* canvas, cdContext* ctx, int xmin, int xmax, int ymin, int ymax, void *data); [in C]</span> + +canvas:Play(ctx, xmin, xmax, ymin, ymax: number, data: string) -> (status: number) [in Lua]</pre> + + <p>Interprets the graphical contents (primitives and attributes) in a given + driver and calls equivalent functions of the CD library using the given + canvas. The primitives are drawn inside the region defined by the given + limits. If <font>limits are 0 (xmin</font>, <font>xmax</font>, + <font>ymin</font> and <font>ymax)</font> the primitives will be drawn with their coordinates having the original + values in the file. </p> + + <p>Only some drivers implement this function:</p> + + + <ul> + <li><a href="../drv/clipbd.html"><b> + CD_CLIPBOARD</b></a> = Clipboard, <font>data</font> is + ignored. </li> + <li><a href="../drv/wmf.html"><b> + CD_WMF</b></a> = Windows Metafile, <font>data</font> is + a <b>char*</b> for the string ''<i>filename</i>''. Works only in + the MS Windows system.</li> + <li><a href="../drv/emf.html"><b> + CD_EMF</b></a> = Windows Enhanced Metafile, <font>data</font> + is a <b>char*</b> for the string ''<i>filename</i>''. Works only in + the MS Windows system.</li> + <li><a href="../drv/cgm.html"><b> + CD_CGM</b></a> = Computer Graphics Metafile ISO, <font> + data</font> is a <b>char*</b> for the string ''<i>filename</i>''.</li> + <li><a href="../drv/mf.html"><b> + CD_METAFILE</b></a> = CD Metafile, <font>data</font> + is a <b>char*</b> for the string ''<i>filename</i>''.</li> + <li><a href="../drv/picture.html"><b> + CD_PICTURE</b></a> = CD Picture, <font>data</font> + is a <strong>cdCanvas</strong><b>*</b> of the Picture canvas.</li> + </ul> + +<pre class="function"><span class="mainFunction">int cdContextRegisterCallback(cdContext *ctx, int cb, int(*func)(cdCanvas* canvas, ...)); [in C]</span> + +cd.ContextRegisterCallback(ctx, cb: number, func: function) -> (status: number) [in Lua]</pre> + + <p>Used to customize the behavior of the <b><font>Play</font></b> + function. If you register a known callback function, it will be called during + the processing loop of <font>cdPlay</font>.</p> + <p>The callback should return <font>CD_CONTINUE</font>, if it + returns <font>CD_ABORT</font>, the <font>cdPlay</font> + function is aborted. The callback identifiers of a given driver must be in the + header file relative to that driver, with prefix "<font>CD_XXYYYCB</font>", + where <font>XX</font> identifies that driver and + <font>YYY</font> identifies the callback name.</p> + <p>There is a default callback common to all implementations of + <font>cdPlay</font>, <b>CD_SIZECB</b>. Its definition + is:</p> +<pre>int cdResizeCB(cdCanvas* canvas, int width, int height, double mm_width, double mm_height)</pre> +<p>It returns the size of the image in the + file before any function in the CD library is called, so that you can call the + <font>cdPlay</font> function without an active canvas and + create the canvas inside the callback. It works as a <b> + <font>cdCanvasGetSize</font></b> function.</p> + + +</body> + +</html>
\ No newline at end of file |