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/drv |
First commit - moving from LuaForge to SourceForge
Diffstat (limited to 'html/en/drv')
-rw-r--r-- | html/en/drv/cgm.html | 184 | ||||
-rw-r--r-- | html/en/drv/clipbd.html | 68 | ||||
-rw-r--r-- | html/en/drv/dbuf.html | 71 | ||||
-rw-r--r-- | html/en/drv/dbufrgb.html | 60 | ||||
-rw-r--r-- | html/en/drv/debug.html | 64 | ||||
-rw-r--r-- | html/en/drv/dgn.html | 161 | ||||
-rw-r--r-- | html/en/drv/dxf.html | 180 | ||||
-rw-r--r-- | html/en/drv/emf.html | 84 | ||||
-rw-r--r-- | html/en/drv/gdiplus.html | 200 | ||||
-rw-r--r-- | html/en/drv/image.html | 57 | ||||
-rw-r--r-- | html/en/drv/irgb.html | 117 | ||||
-rw-r--r-- | html/en/drv/iup.html | 65 | ||||
-rw-r--r-- | html/en/drv/mf.html | 80 | ||||
-rw-r--r-- | html/en/drv/native.html | 91 | ||||
-rw-r--r-- | html/en/drv/pdf.html | 227 | ||||
-rw-r--r-- | html/en/drv/picture.html | 81 | ||||
-rw-r--r-- | html/en/drv/printer.html | 83 | ||||
-rw-r--r-- | html/en/drv/ps.html | 208 | ||||
-rw-r--r-- | html/en/drv/sim.html | 90 | ||||
-rw-r--r-- | html/en/drv/win32.html | 137 | ||||
-rw-r--r-- | html/en/drv/wmf.html | 116 | ||||
-rw-r--r-- | html/en/drv/xrender.html | 152 | ||||
-rw-r--r-- | html/en/drv/xwin.html | 129 |
23 files changed, 2705 insertions, 0 deletions
diff --git a/html/en/drv/cgm.html b/html/en/drv/cgm.html new file mode 100644 index 0000000..17ca141 --- /dev/null +++ b/html/en/drv/cgm.html @@ -0,0 +1,184 @@ +<!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>CD_CGM</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>CD_CGM - <em>Computer Graphics Metafile Driver </em>(cdcgm.h)</h2> + + <p>This driver allows generating a Computer Graphics Metafile, which is an ANSI standard for the persistent storage of + graphics primitives. The file usually has an extension .CGM.</p> + +<h3>Use</h3> + + <p>The file file is created by means of a call to the function <font face="Courier"> + <a href="../func/init.html#cdCreateCanvas"><strong>cdCreateCanvas</strong></a>(CD_CGM, + Data)</font>, which <b>opens</b> the file and writes its header. Then, other functions in the CD library can be called + as usual. The <font face="Courier">Data</font> parameter string has the following format:</p> + + <pre><em>"filename [widthxheight] [resolution] [-t] -p[precision]" or in C style "<strong><tt>%s %gx%g %g %s</tt></strong>"</em></pre> + + <p>Only the parameter <font face="Courier">filename</font> is required. The filename must be inside double quotes (") + if it has spaces.<font face="Courier"> Width</font> and <font face="Courier">height</font> are provided in millimeters + (note the lowercase "x" between them), and their default value in pixels is <font face="Courier">INT_MAX</font> for + both dimensions. When the canvas' size is not specified, the VDC Extension saved to the file is the image's bounding + rectangle. The resolution is the number of pixels per millimeter; its default value is "3.78 pixels/mm" (96 DPI). + <font face="Courier">Width</font>, <font face="Courier">height</font> and <font face="Courier">resolution</font> are + real values. <font face="Courier">Width</font>, <font face="Courier">height</font> and <font face="Courier">resolution</font> + are used only by <strong><font face="Courier">cdGetCanvasSize</font> </strong>and in pixel-millimeter conversion. + Parameter <font face="Courier">-t</font> modifies the codification. Parameter <font face="Courier">-p</font> specifies + the precision of integers, which can be 16 (default) or 32.</p> + <p>Any amount of such canvases may exist simultaneously. It is important to note that a call to function + <a href="../func/init.html#cdKillCanvas"><font face="Courier"><strong> + cdKillCanvas</strong></font></a> is required to <b>close</b> the file properly.</p> + <p><strong>Coding -</strong> The CGM format supports binary and text coding. If you are not sure what to do, use + binary coding, which is the default. Should you prefer text coding, add a "<font face="Courier">-t</font>" string to + the <font face="Courier">Data</font> parameter.</p> + <p><strong>Precision of Coordinates -</strong> The primitives can use coordinates in real numbers. However, for + compatibility reasons, we use coordinates in integers.</p> + +<h3>Behavior of Functions</h3> +<h4>Control </h4> +<ul> + <li><a href="../func/control.html#cdClear"><font face="Courier"><strong>Clear</strong></font></a>: + does nothing.</li> + <li><a href="../func/control.html#cdFlush"><font face="Courier"><strong>Flush</strong></font></a>: + creates a new image, preserving the previous one. The CGM format supports multiple images in a file.</li> + <li><a href="../func/other.html#cdPlay"><font face="Courier"><strong>Play</strong></font></a>: + works with files created with text or binary coding. There are several callbacks for this driver. If one of the + callbacks returns a value different from zero, <font face="Courier">cdPlay</font>'s processing is interrupted. The + driver implements the callback <tt><strong><font face="Courier">CD_SIZECB</font> </strong></tt>and other callbacks + associated to CGM:<br> + <tt><font face="Courier"><strong>CD_COUNTERCB</strong></font> - int(*cdcgmcountercb)(cdContext *driver, double + percent) - </tt>Executed for each header of CGM commands; returns the percentage (0-100%) of headers read.<br> + <font face="Times New Roman"><code><strong><span style="font-family: Courier">CD_SCLMDECB</span></strong></code></font><tt> - int(*cdcgmsclmdecb)(cdContext + *driver, short scl_mde, short *drw_mode, double *factor)</tt> <font face="Courier">-</font> Executed for the command + CGM SCALE MODE. Returns the current CGM scale mode and allows the callback to modify the scale mode used by the + <font face="Courier">cdPlay</font> function <font face="Courier">(ABSTRACT=0, METRIC=1)</font>. Should you choose the + METRIC or ABSTRACT scale mode but the original scale mode is METRIC, you must provide the conversion factor in mm per + pixel.<br> + <font face="Times New Roman"><code><strong><span style="font-family: Courier">CD_VDCEXTCB</span></strong></code></font><tt> - int(*cdcgmvdcextcb)(cdContext + *driver, short type, void *xmn, void *ymn, void *xmx, void *ymx)</tt> <font face="Courier">-</font> Executed for the + CGM command CGM VDC EXTENT, returns the VDC SPACE. <br> + <font face="Times New Roman"><code><strong><span style="font-family: Courier">CD_BEGPICTCB</span></strong></code></font><tt> - int(*cdcgmbegpictcb)(cdContext + *driver, char *pict)</tt> <font face="Courier">-</font> Executed for the command BEGIN PICTURE, returns the string + that describes the image.<br> + <font face="Times New Roman"><code><strong><span style="font-family: Courier">CD_BEGPICTBCB</span></strong></code></font><tt> - int(*cdcgmbegpictbcb)(cdContext + *driver)</tt> <font face="Courier">-</font> Executed for the command BEGIN PICTURE BODY.<br> + <font face="Times New Roman"><code><strong><span style="font-family: Courier">CD_CGMBEGMTFCB</span></strong></code></font> - <font face="Times New Roman"><code> + int (*cdcgmbegmtfcb)(cdContext *driver, int *xmin, int *ymin, int *xmax, int *ymax)</code></font> - Executed for the + command BEGIN METAFILE, provides the drawing limits of the image in the file.</li> +</ul> +<h4>Coordinate System and Clipping</h4> +<ul> + <li><a href="../func/coordinates.html#cdUpdateYAxis"><font face="Courier"> + <strong>UpdateYAxis</strong></font></a>: does nothing. The axis orientation is the same as the CD library.</li> + <li><b>Complex Regions</b>: not supported.</li> + <li><strong>Transformation Matrix</strong>: not supported.</li> +</ul> +<h4>Primitives</h4> +<ul> + <li><a href="../func/lines.html#cdBegin"><font face="Courier"><strong>Begin</strong></font></a>: + if parameter <strong><tt>CD_CLIP</tt></strong> or <strong><tt>CD_BEZIER</tt></strong> are specified, does nothing.</li> + <li><font face="Courier"><strong><a href="../func/marks.html#cdPixel">Pixel</a></strong></font>: + does not exist in CGM, is simulated using a mark with size 1.</li> + <li><strong><font face="Courier"><a href="../func/filled.html#cdChord">Chord</a></font></strong>: + does nothing.</li> + <li>Floating point primitives are supported.</li> +</ul> +<h4>Attributes </h4> +<ul> + <li><a href="../func/attributes.html#cdWriteMode"><font face="Courier"> + <strong> + WriteMode</strong></font></a>: does nothing, returns <font face="Courier">CD_REPLACE</font>.</li> + <li><a href="../func/text.html#cdFontDim"><font face="Courier"><strong>FontDim</strong></font></a>: + is simulated.</li> + <li><a href="../func/filled.html#cdFillMode"><font face="Courier"><strong> + FillMode</strong></font></a>: does nothing.</li> + <li><a href="../func/filled.html#cdLineCap"><font face="Courier"><strong> + LineCap</strong></font></a>: does nothing.</li> + <li><a href="../func/filled.html#cdLineJoin"><font face="Courier"><strong> + LineJoin</strong></font></a>: does nothing.</li> + <li><a href="../func/text.html#cdTextSize"><font face="Courier"><strong> + TextSize</strong></font></a>: is simulated.</li> + <li><a href="../func/text.html#cdTextOrientation"><font face="Courier"> + <strong> + TextOrientation</strong></font></a>: does nothing.</li> + <li><a href="../func/text.html#cdFont"><font face="Courier"><strong>Font</strong></font></a>: + see the table bellow for the generated font names. No other fonts are + supported.</li> +</ul> +<div align="center"> + <center> + <table border="1" cellpadding="5"> + <caption style="text-align: center"><font size="4">Font Mapping</font></caption> + <tr> + <th rowspan="2">CD Fonts</th> + <th colspan="4">Generated Font Names</th> + </tr> + <tr> + <th>CD_PLAIN</th> + <th>CD_BOLD</th> + <th>CD_ITALIC</th> + <th>CD_BOLD|CD_ITALIC</th> + </tr> + <tr> + <td>"System"</td> + <td>"SYSTEM"</td> + <td>"SYSTEM_BOLD"</td> + <td>"SYSTEM_ITALIC"</td> + <td>"SYSTEM_BOLDITALIC"</td> + </tr> + <tr> + <td>"Courier"</td> + <td>"COURIER" </td> + <td>"COURIER_BOLD" </td> + <td>"COURIER_ITALIC" </td> + <td>"COURIER_BOLDITALIC"</td> + </tr> + <tr> + <td>"Times"</td> + <td>"TIMES_ROMAN" </td> + <td>"TIMES_ROMAN_BOLD"</td> + <td>"TIMES_ROMAN_ITALIC"</td> + <td>"TIMES_ROMAN_BOLDITALIC" </td> + </tr> + <tr> + <td>"Helvetica"</td> + <td>"HELVETICA" </td> + <td>"HELVETICA_BOLD"</td> + <td>"HELVETICA_ITALIC"</td> + <td>"HELVETICA_BOLDITALIC"</td> + </tr> + </table> + </center> +</div> +<h4>Colors </h4> +<ul> + <li><a href="../func/color.html#cdGetColorPlanes"><font face="Courier"> + <strong> + GetColorPlanes</strong></font></a>: returns 24.</li> + <li><a href="../func/color.html#cdPalette"><font face="Courier"><strong>Palette</strong></font></a>: + does nothing. </li> +</ul> +<h4>Client Images </h4> +<ul> + <li><a href="../func/client.html#cdGetImageRGB"><font face="Courier"><strong> + GetImageRGB</strong></font></a>: does nothing.</li> + <li><a href="../func/client.html#cdPutImageRGBA"><font face="Courier"><strong> + PutImageRGBA</strong></font></a>: alpha is ignored.</li> +</ul> +<h4>Server Images</h4> +<ul> + <li>All functions do nothing.</li> +</ul> + +</body> + +</html> diff --git a/html/en/drv/clipbd.html b/html/en/drv/clipbd.html new file mode 100644 index 0000000..0b9be2d --- /dev/null +++ b/html/en/drv/clipbd.html @@ -0,0 +1,68 @@ +<!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>CD_CLIPBOARD</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>CD_CLIPBOARD - Clipboard Driver (cdclipbd.h)</h2> + + <p>This driver allows the access to a Clipboard area. It is greatly dependent + on the system. In Win32, it creates an <a href="emf.html">Enhanced Metafile</a>, + a <b>Bitmap</b> or a <a href="mf.html">CD Metafile</a>; in X-Windows it + creates only a <a href="mf.html">CD Metafile</a>.</p> + +<h3>Use</h3> + + <p>The canvas is created by means of a call to function <font face="Courier"> + <a href="../func/init.html#cdCreateCanvas"> + <strong>cdCreateCanvas</strong></a>(CD_CLIPBOARD, Data)</font>, after which + other functions in the CD library can be called as usual. The + <font face="Courier">Data</font> parameter string is platform-dependent and + varies according to the metafile created. See each metafile's documentation, + but remember to exclude parameter <font face="Courier">"filename".</font></p> + <p>In the Windows environment, if the string "<font face="Courier">-b</font>" + is present, it means that a <b>Bitmap</b> must be created instead of a + metafile, and, if the string <font face="Courier">"-m"</font> is specified, a + <b>CD Metafile</b> will be created. For a <b>Bitmap</b> the remaining string + must contains the bitmap size and optionally its resolution: <em>"-b + widthxheight [resolution]"</em> or in C "<tt><em><strong>%dx%d %g"</strong></em></tt>, + the resolution default is the screen resolution.</p> + <p>In the X-Windows environment, the Display <font face="Courier">("%p")</font> + where the data will be stored must be passed as a parameter before the <b>CD + Metafile</b> parameters. This environment's driver is used only for + applications that use CD to communicate with each other, because only CD Metafiles + are created.</p> + <p>Any amount of such canvases may exist simultaneously. It is important to + note that a call to function + <a href="../func/init.html#cdKillCanvas"> + <font face="Courier"><strong>cdKillCanvas</strong></font></a> is required to + properly copy the data to the Clipboard.</p> + <p>You can interpret the data from the Clipboard using function <strong>cdPlay</strong>. In the X-Windows environment, the + parameter <font face="Courier">"data"</font> for the <strong>cdPlay + </strong>function is the pointer to the + Display where the metafile will be obtained. The <strong>cdRegisterCallback</strong> + must be called for the driver that will interpret the file, except for bitmaps + that the <strong>CD_CLIPBOARD</strong> driver must be used.</p> +<p>To use this driver in Windows using GDI+ is necessary to call +<font face="Courier"><strong> + cdUseContextPlus</strong></font><strong><font face="Courier">(1)</font></strong> +before creating the canvas.</p> + +<h3>Behavior of Functions</h3> + + <p>This driver is greatly platform-dependent. For further detail, see the <b> + Behavior of Functions</b> in each platform: <a href="win32.html">Microsoft + Windows (GDI)</a>, <a href="xwin.html">X-Windows (XLIB)</a>. However, it + should be noted that some functions behave differently from the basic + functions of each platform.</p> + + +</body> + +</html> diff --git a/html/en/drv/dbuf.html b/html/en/drv/dbuf.html new file mode 100644 index 0000000..37b5c89 --- /dev/null +++ b/html/en/drv/dbuf.html @@ -0,0 +1,71 @@ +<!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>CD_DBUFFER</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>CD_DBUFFER - Double Buffer Driver using a server image (cddbuf.h)</h2> + + <p>Implements the concept of offscreen drawing. It is based on a Server Image + (the back buffer) and a Window canvas (the front buffer).</p> + +<h3>Use</h3> + + <p>The canvas is created by means of a call to function + <a href="../func/init.html#cdCreateCanvas"> + <font face="Courier"><strong>cdCreateCanvas</strong></font></a><font face="Courier">(CD_DBUFFER, + Data)</font>, after which other functions in the CD library can be called as + usual. This function creates a CD canvas to use with an existing window canvas + (Native Windows or IUP). The parameter <font face="Courier">Data</font> is a + pointer to the already created canvas.</p> + <p>Any amount of such canvases may exist simultaneously. It is important to + note that a call to function + <a href="../func/init.html#cdKillCanvas"> + <font face="Courier"><strong>cdKillCanvas</strong></font></a> is required to + properly <b>end</b> the driver. Call function + <a href="../func/init.html#cdKillCanvas"> + <font face="Courier"><strong>cdKillCanvas</strong></font></a> for this driver + before calling <font face="Courier"><strong>cdKillCanvas</strong></font> for + the window driver.</p> + <p>The drawing functions will work normally as if they were drawn on + the server image driver. When function <font face="Courier"><b> + <a href="../func/control.html#cdFlush"> + cdCanvasFlush</a></b></font> is executed, the image is drawn in the window canvas + passed as parameter in the canvas creation.</p> + <p>When the window's size changes, the server image is automatically recreated + using the same size as the canvas. This is done in the function + <font face="Courier"><b> + <a href="../func/init.html#cdActivate"> + cdCanvasActivate</a></b></font>.</p> +<p>We suggest you to implement rubber bands using XOR directly on the front +buffer.</p> +<p>To use this driver in Windows using GDI+ is necessary to call +<font face="Courier"><strong> + cdUseContextPlus</strong></font><strong><font face="Courier">(1)</font></strong> +before creating the canvas.</p> + +<h3>Behavior of Functions</h3> + + <p>This driver is greatly platform-dependent. For further detail, see the <b> + Behavior of Functions</b> in each platform: <a href="win32.html">Microsoft + Windows (GDI)</a>, <a href="gdiplus.html">Windows Using GDI+</a>, + <a href="xwin.html">X-Windows (XLIB)</a>. However, it should be noted that + some functions behave differently from the basic functions of each platform.</p> +<h4>Control</h4> +<ul> + <li><a href="../func/control.html#cdFlush"><font face="Courier"><strong>Flush</strong></font></a>: + draws the contents of the image into the window. It is affected by <strong> + Origin</strong> and <strong>Clipping</strong>, but not by <strong>WriteMode</strong>.</li> +</ul> +<p> </p> + + +</body> + +</html> diff --git a/html/en/drv/dbufrgb.html b/html/en/drv/dbufrgb.html new file mode 100644 index 0000000..a9fa4c8 --- /dev/null +++ b/html/en/drv/dbufrgb.html @@ -0,0 +1,60 @@ +<!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>CD_DBUFFER</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>CD_DBUFFERRGB - Double Buffer Driver using a RGB image (cdirgb.h)</h2> + + <p>Implements the concept of offscreen drawing. It is based on a Image + RGB (the back buffer) and any other canvas (the front buffer).</p> + +<h3>Use</h3> + + <p>The canvas is created by means of a call to function + <a href="../func/init.html#cdCreateCanvas"> + <font face="Courier"><strong>cdCreateCanvas</strong></font></a><font face="Courier">(CD_DBUFFERRGB, + Data)</font>, after which other functions in the CD library can be called as + usual. This function creates a CD canvas to use with any existing canvas. The parameter <font face="Courier">Data</font> is a + pointer to the already created canvas.</p> + <p>Any amount of such canvases may exist simultaneously. It is important to + note that a call to function + <a href="../func/init.html#cdKillCanvas"> + <font face="Courier"><strong>cdKillCanvas</strong></font></a> is required to + properly <b>end</b> the driver. Call function + <a href="../func/init.html#cdKillCanvas"> + <font face="Courier"><strong>cdKillCanvas</strong></font></a> for this driver + before calling <font face="Courier"><strong>cdKillCanvas</strong></font> for + the client canvas driver.</p> + <p>The drawing functions will work normally as if they were drawn on + the image RGB driver. When function <font face="Courier"><b> + <a href="../func/control.html#cdFlush"> + cdCanvasFlush</a></b></font> is executed, the image is drawn in the canvas + passed as parameter in the canvas creation.</p> + <p>When the window's size changes, the RGB image is automatically recreated + using the same size as the canvas. This is done in the function + <font face="Courier"><b> + <a href="../func/init.html#cdActivate"> + cdCanvasActivate</a></b></font>.</p> + +<h3>Behavior of Functions</h3> + + <p>This driver depends on the <a href="irgb.html">RGB Client Image Driver</a>.</p> +<h4>Control</h4> +<ul> + <li><a href="../func/control.html#cdFlush"><font face="Courier"><strong>Flush</strong></font></a>: + draws the contents of the image into the window. It is affected by <strong> + Origin</strong> and <strong>Clipping</strong>, but not by <strong>WriteMode</strong>.</li> +</ul> +<p> </p> + + +</body> + +</html> diff --git a/html/en/drv/debug.html b/html/en/drv/debug.html new file mode 100644 index 0000000..e405dac --- /dev/null +++ b/html/en/drv/debug.html @@ -0,0 +1,64 @@ +<!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>CD_METAFILE</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>CD_DEBUG - CD Debug Driver (cddebug.h)</h2> + + <p>This driver creates a text file with a log of all function calls. But for + only the functions that have a driver implementation and in the order that + the driver implements sequece of functions like Begin/Vertex/End. Pointers + are stored as addresses, and definitions are stored as the CD definition + "CD_XXX".</p> + +<h3>Use</h3> + + <p>The file is created by calling function <font face="Courier"> + <a href="../func/init.html#cdCreateCanvas"><strong>cdCreateCanvas</strong></a>(CD_DEBUG, + Data)</font>. The <font face="Courier">Data</font> parameter is a string that must contain the filename and the canvas + dimensions, in the following format:</p> + + <pre>"<i>filename </i>[widthxheight resolution]" or in <em>C use "<strong><tt>%s %gx%g %g</tt></strong>"</em></pre> + + <p>Only the parameter <font face="Courier">filename</font> is required. The filename must be inside double quotes (") + if it has spaces.<font face="Courier"> Width</font> and <font face="Courier">height</font> are provided in millimeters + (note the lowercase "x" between them), and their default value in pixels is <font face="Courier">INT_MAX</font> for + both dimensions. <font face="Courier">Resolution </font>is the number of pixels per millimeter; its default value is + "3.78 pixels/mm" (96 DPI). <font face="Courier">Width</font>, <font face="Courier">height</font> and + <font face="Courier">resolution</font> are real values.</p> + <p>Any amount of such canvases may exist simultaneously. It is important to note that a call to function + <a href="../func/init.html#cdKillCanvas"><font face="Courier"><strong> + cdKillCanvas</strong></font></a> is required to <b>close</b> the file properly.</p> + +<h3>Behavior of Functions</h3> +<h4>Coordinate System and Clipping </h4> +<ul> + <li><a href="../func/other.html#cdPlay"> + <font face="Courier"><strong>Play</strong></font></a>: NOT implemented. </li> + <li><a href="../func/coordinates.html#cdUpdateYAxis"><font face="Courier"> + <strong>UpdateYAxis</strong></font></a>: does nothing.</li> +</ul> +<h4>Attributes</h4> +<dir> + <li><a href="../func/text.html#cdFontDim"><font face="Courier"><strong>FontDim</strong></font></a>: + uses a size estimator, returning approximate values.</li> + <li><a href="../func/text.html#cdTextSize"><font face="Courier"><strong> + TextSize</strong></font></a>: uses a size estimator, returning approximate values.</li> +</dir> +<h4>Colors</h4> +<ul> + <li><a href="../func/color.html#cdGetColorPlanes"><font face="Courier"> + <strong> + GetColorPlanes</strong></font></a>: always returns 24.</li> +</ul> + +</body> + +</html> diff --git a/html/en/drv/dgn.html b/html/en/drv/dgn.html new file mode 100644 index 0000000..acd688b --- /dev/null +++ b/html/en/drv/dgn.html @@ -0,0 +1,161 @@ +<!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>CD_DGN</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>CD_DGN - MicroStation Design File Driver (cddgn.h)</h2> + + <p>This driver allows generating a MicroStation design file. The file name usually has an extension .DGN. The driver + supports only MicroStation version 4.0 or later. The format's copyrights are property of + <a href="http://www.bentley.com" target="_top">Bentley Systems</a>.</p> + +<h3>Use</h3> + + <p>The file is created and opened by calling function <font face="Courier"> + <a href="../func/init.html#cdCreateCanvas"><strong>cdCreateCanvas</strong></a>(CD_DGN, + Data)</font>, in which <font face="Courier">Data</font> contains the filename and canvas dimensions. This function + opens the file and writes its header. Then, other functions in the CD library can be called as usual. The + <font face="Courier">Data</font> parameter string has the following format:</p> + + <pre><em>"filename [widthxheight] [resolution] [-f] [-sseedfile]" </em>or in C <em>"<strong><tt>%s %gx%g %g %s</tt></strong>"</em></pre> + + <p>Only the parameter <font face="Courier">filename</font> is required. The filename must be inside double quotes (") + if it has spaces.<font face="Courier"> Width</font> and <font face="Courier">height</font> are provided in millimeters + (note the lowercase "x" between them), and their default value in pixels is <font face="Courier">INT_MAX</font> for + both dimensions. <font face="Courier">Resolution </font>is the number of pixels per millimeter; its default value is + "3.78 pixels/mm" (96 DPI). <font face="Courier">Width</font>, <font face="Courier">height</font> and + <font face="Courier">resolution</font> are real values. Parameter <font face="Courier">-f</font> modifies the polygon + filling's behavior. Just as in MicroStation, you can specify a seed file using parameter <font face="Courier">-s</font>. + <font face="Courier">Width</font>, <font face="Courier">height</font> and <font face="Courier">resolution</font> are + used only by <a href="../func/coordinates.html#cdGetCanvasSize"> + <font face="Courier"><strong>cdCanvasGetSize</strong></font></a><font face="Courier"><strong> </strong></font>and in + pixel-millimeter conversion. </p> + <p>Any amount of such canvases may exist simultaneously. It is important to note that a call to function + <a href="../func/init.html#cdKillCanvas"><font face="Courier"><strong> + cdKillCanvas</strong></font></a> is required to close the file properly.</p> + <p><b>Images and Colors</b> - The DGN format does not support server images and works with an indexed-color format. + Color quality is limited to 256 colors, and the format uses a uniform palette to convert RGB colors into palette + indices. If you configure a palette, the color conversion process will become slower.</p> + <p><b>Filling</b> - Up to version 5.0, MicroStation presents some limitations for polygon filling. You can disable + filling by means of string "<font face="Courier">-f</font>" in the <font face="Courier">Data</font> parameter. Filled + polygons can only have around 10,000 vertices; if the value is larger, the polygon style changes to closed lines.</p> + <p><b>Seed</b> - In the seed file, several DGN parameters can be defined to be used in the drawing. The library offers + a default seed file, called "SEED2D.DGN". The file's location depends on the environment variable <strong>CDDIR</strong>.</p> + +<h3>Behavior of Functions</h3> +<h4>Control</h4> +<ul> + <li><a href="../func/control.html#cdClear"><font face="Courier"><strong>Clear</strong></font></a>: + does nothing.</li> + <li><a href="../func/other.html#cdPlay"><font face="Courier"><strong>Play</strong></font></a>: + does nothing, returns <font face="Courier">CD_ERROR</font>. </li> +</ul> +<h4>Coordinate System and Clipping </h4> +<ul> + <li><a href="../func/clipping.html#cdClip"><font face="Courier"><strong>Clip</strong></font></a>: + does nothing (no clipping function is supported), returns <font face="Courier">CD_CLIPOFF</font>.</li> + <li><a href="../func/coordinates.html#cdUpdateYAxis"><font face="Courier"> + <strong>UpdateYAxis</strong></font></a>: does nothing. The axis orientation is the same as the CD library.</li> + <li><strong>Transformation Matrix</strong>: not supported.</li> +</ul> +<h4>Primitives</h4> +<ul> + <li><a href="../func/lines.html#cdBegin"><font face="Courier"><strong>Begin</strong></font></a>: + if parameter <strong><tt>CD_CLIP</tt></strong> or <strong><tt>CD_BEZIER</tt></strong> are specified, does nothing.</li> + <li><strong><font face="Courier"><a href="../func/filled.html#cdChord">cdChord</a></font></strong>: + does nothing.</li> +</ul> +<h4>Attributes </h4> +<ul> + <li><a href="../func/filled.html#cdBackOpacity"><font face="Courier"><strong> + BackOpacity</strong></font></a>: does nothing, returns <font face="Courier">CD_OPAQUE</font>.</li> + <li><a href="../func/attributes.html#cdWriteMode"><font face="Courier"> + <strong> + WriteMode</strong></font></a>: does nothing, returns <font face="Courier">CD_REPLACE</font>.</li> + <li><a href="../func/filled.html#cdInteriorStyle"><font face="Courier"> + <strong> + InteriorStyle</strong></font></a>: does nothing.</li> + <li><a href="../func/filled.html#cdFillMode"><font face="Courier"><strong> + FillMode</strong></font></a>: does nothing.</li> + <li><a href="../func/filled.html#cdLineCap"><font face="Courier"><strong> + LineCap</strong></font></a>: does nothing.</li> + <li><a href="../func/filled.html#cdLineJoin"><font face="Courier"><strong> + LineJoin</strong></font></a>: does nothing.</li> + <li><a href="../func/filled.html#cdHatch"><font face="Courier"><strong>Hatch</strong></font></a>: + does nothing.</li> + <li><a href="../func/filled.html#cdStipple"><font face="Courier"><strong> + Stipple</strong></font></a>: does nothing.</li> + <li><a href="../func/filled.html#cdPattern"><font face="Courier"><strong> + Pattern</strong></font></a>: does nothing.</li> + <li><a href="../func/text.html#cdTextSize"><font face="Courier"><strong> + TextSize</strong></font></a>: returns a bounding box which is usually larger than the text (the computation is based + on the widest character).</li> + <li><a href="../func/text.html#cdTextAlignment"><font face="Courier"><strong> + TextAlignment</strong></font></a>: uses <font face="Courier"><strong>cdTextSize</strong></font>, therefore is not + precise.</li> + <li><a href="../func/text.html#cdFont"><font face="Courier"><strong>Font</strong></font></a>: + See the font mapping table for the equivalence used to map CD fonts into + MicroStation fonts. Styles are not supported.</li> +</ul> +<div align="center"> + <center> + <table border="1" cellpadding="5"> + <caption valign="top"><font size="4">Font Mapping</font></caption> + <tr> + <th>CD Fonts</th> + <th>MicroStation Font Index</th> + </tr> + <tr> + <td><font face="Courier">CD_SYSTEM</font></td> + <td><font face="Courier">0</font></td> + </tr> + <tr> + <td><font face="Courier">CD_COURIER</font> </td> + <td><font face="Courier">1</font></td> + </tr> + <tr> + <td><font face="Courier">CD_TIMES_ROMAN</font></td> + <td><font face="Courier">2</font></td> + </tr> + <tr> + <td><font face="Courier">CD_HELVETICA</font></td> + <td><font face="Courier">3</font></td> + </tr> + </table> + </center> +</div> +<h4>Colors </h4> +<ul> + <li><a href="../func/color.html#cdGetColorPlanes"><font face="Courier"> + <strong> + GetColorPlanes</strong></font></a>: returns 8 (MicroStation uses a palette with 256 values).</li> + <li><a href="../func/attributes.html#cdBackground"><font face="Courier"> + <strong> + Background</strong></font></a>: always returns <code><font face="Times New Roman">CD_WHITE</font></code>.</li> +</ul> +<h4>Client Images </h4> +<ul> + <li><a href="../func/client.html#cdGetImageRGB"><font face="Courier"><strong> + GetImageRGB</strong></font></a>: does nothing.</li> + <li><a href="../func/client.html#cdPutImageRGB"><font face="Courier"><strong> + PutImageRGB</strong></font></a>: considering that the format supports only 256 colors, image quality is quite poor.</li> + <li><a href="../func/client.html#cdPutImageRGBA"><font face="Courier"><strong> + PutImageRGBA</strong></font></a>: alpha is ignored.</li> + <li><a href="../func/client.html#cdPutImageMap"><font face="Courier"><strong> + PutImageMap</strong></font></a>: considering that the format supports only 256 colors, image quality is quite poor.</li> +</ul> +<h4>Server Images </h4> +<ul> + <li>All functions do nothing.</li> +</ul> + +</body> + +</html> diff --git a/html/en/drv/dxf.html b/html/en/drv/dxf.html new file mode 100644 index 0000000..95274ee --- /dev/null +++ b/html/en/drv/dxf.html @@ -0,0 +1,180 @@ +<!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>CD_DXF</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>CD_DXF - AutoCAD Image Exchange File Driver (cddxf.h)</h2> + + <p>This driver allows generating an AutoCAD image exchange file. The file name usually has an extension .DXF. This + driver supports only AutoCAD version 10.0 or later. The format's copyrights are property of + <a href="http://www.autodesk.com" target="_top">Autodesk</a>.</p> + +<h3>Use</h3> + + <p>The file is created and opened by calling function <font face="Courier"> + <a href="../func/init.html#cdCreateCanvas"><strong>cdCreateCanvas</strong></a>(CD_DXF, + Data)</font>, in which <font face="Courier">Data</font> contains the file name and canvas dimensions. This function + opens the file and writes its header. Then, other functions in the CD library can be called as usual. The + <font face="Courier">Data</font> parameter string has the following format:</p> + + <pre><em>"filename [widthxheight] [resolution]" </em>or in C <em>"<strong><tt>%s %gx%g %g</tt></strong>"</em></pre> + + <p>Only the parameter <font face="Courier">filename</font> is required. The filename must be inside double quotes (") + if it has spaces.<font face="Courier"> Width</font> and <font face="Courier">height</font> are provided in millimeters + (note the lowercase "x" between them), and their default value in pixels is <font face="Courier">INT_MAX</font> for + both dimensions. <font face="Courier">Resolution </font>is the number of pixels per millimeter; its default value is + "3.78 pixels/mm" (96 DPI). <font face="Courier">Width</font>, <font face="Courier">height</font> and + <font face="Courier">resolution</font> are given in real values and are used only by + <a href="../func/coordinates.html#cdGetCanvasSize"><font face="Courier"><strong> + cdCanvasGetSize</strong></font></a><font face="Courier"><strong> </strong></font>and in pixel-millimeter conversion. </p> + <p>Any amount of such canvases may exist simultaneously. It is important to note that a call to function + <a href="../func/init.html#cdKillCanvas"><font face="Courier"><strong> + cdKillCanvas</strong></font></a> is required to close the DXF file properly.</p> + <p><b>Images </b>- The DXF format does not support client or server images and works with an indexed-color format + (color quality is limited to 256 fixed colors). </p> + <p><strong>Precision of Coordinates -</strong> The primitives use coordinates in real numbers.</p> + <p><strong>Layers -</strong> The format can work with several layers. It is necessary to draw the primitives of layer + '0' first, then layer '1' and so on. Use functions + <a href="../func/control.html#cdFlush"><font face="Courier"><strong>Flush</strong></font></a> + to change the current layer.</p> + +<h3>Behavior of Functions</h3> +<h4>Control </h4> +<ul> + <li><a href="../func/control.html#cdFlush"><font face="Courier"><strong>Flush</strong></font></a>: + changes the current layer (the initial layer is '0', followed by '1' and so on). </li> + <li><a href="../func/control.html#cdClear"><font face="Courier"><strong>Clear</strong></font></a>: + does nothing.</li> + <li><a href="../func/other.html#cdPlay"><font face="Courier"><strong>Play</strong></font></a>: + does nothing, returns <font face="Courier">CD_ERROR</font>. </li> +</ul> +<h4>Coordinate System and Clipping</h4> +<ul> + <li><a href="../func/clipping.html#cdClip"><font face="Courier"><strong>Clip</strong></font></a>: + does nothing (no clipping function is supported), returns <font face="Courier">CD_CLIPOFF</font>.</li> + <li><a href="../func/coordinates.html#cdUpdateYAxis"><font face="Courier"> + <strong>UpdateYAxis</strong></font></a>: does nothing. Axis orientation is the same as in the CD library.</li> + <li><strong>Transformation Matrix</strong>: not supported.</li> +</ul> +<h4>Primitives</h4> +<ul> + <li><a href="../func/filled.html#cdBox"><font face="Courier"><strong>Box</strong></font></a>: + draws only the box's borders (no filling function is supported). Behaves like + <strong><font face="Courier">Rect</font></strong>.</li> + <li><a href="../func/filled.html#cdSector"><font face="Courier"><strong>Sector</strong></font></a>: + draws a "hollow" sector, that is, only its borders.</li> + <li><a href="../func/lines.html#cdBegin"><font face="Courier"><strong>Begin</strong></font></a>: + <font face="Courier"><strong><tt>CD_FILL</tt></strong></font> is mapped to <font face="Courier"><strong><tt> + CD_CLOSED_LINES</tt></strong></font>. if parameter <strong><tt>CD_CLIP</tt></strong> or <strong><tt>CD_BEZIER</tt></strong> + are specified, does nothing.</li> + <li><strong><font face="Courier"><a href="../func/filled.html#cdChord">Chord</a></font></strong>: + does nothing.</li> + <li>Floating point primitives are supported.</li> +</ul> +<h4>Attributes</h4> +<ul> + <li><a href="../func/filled.html#cdBackOpacity"><font face="Courier"><strong> + BackOpacity</strong></font></a>: does nothing, returns <font face="Courier">CD_TRANSPARENT</font>.</li> + <li><a href="../func/attributes.html#cdWriteMode"><font face="Courier"> + <strong> + WriteMode</strong></font></a>: does nothing, returns <font face="Courier">CD_REPLACE</font>.</li> + <li><a href="../func/filled.html#cdInteriorStyle"><font face="Courier"> + <strong> + InteriorStyle</strong></font></a>: does nothing (filling is not supported), returns 0.</li> + <li><a href="../func/filled.html#cdHatch"><font face="Courier"><strong>Hatch</strong></font></a>: + does nothing. </li> + <li><a href="../func/filled.html#cdFillMode"><font face="Courier"><strong> + FillMode</strong></font></a>: does nothing.</li> + <li><a href="../func/filled.html#cdLineCap"><font face="Courier"><strong> + LineCap</strong></font></a>: does nothing.</li> + <li><a href="../func/filled.html#cdLineJoin"><font face="Courier"><strong> + LineJoin</strong></font></a>: does nothing.</li> + <li><a href="../func/filled.html#cdStipple"><font face="Courier"><strong> + Stipple</strong></font></a>: does nothing.</li> + <li><a href="../func/filled.html#cdPattern"><font face="Courier"><strong> + Pattern</strong></font></a>: does nothing.</li> + <li><a href="../func/text.html#cdTextSize"><font face="Courier"><strong> + TextSize</strong></font></a>: returns a bounding box usually larger than the text (the computation is based on the + widest character).</li> + <li><a href="../func/text.html#cdTextOrientation"><font face="Courier"> + <strong> + TextOrientation</strong></font></a>: does nothing.</li> + <li><a href="../func/text.html#cdFont"><font face="Courier"><strong>Font</strong></font></a>: + italic styles correspond to the basic styles with an inclination of 15<sup>o</sup>. See the font mapping table for the + equivalence used to map fonts of the CD library into AutoCAD fonts. No + other fonts are supported.</li> +</ul> +<div align="center"> + <center> + <table border="1" cellpadding="5"> + <caption valign="top"><font size="4">Font Mapping</font></caption> + <tr> + <th>CD Fonts</th> + <th>AutoCAD Fonts</th> + </tr> + <tr> + <td><font face="Courier">S</font><span style="font-family: Courier">ystem</span></td> + <td><font face="Courier">STANDARD (sem arquivo)</font></td> + </tr> + <tr> + <td><font face="Courier">Courier</font></td> + <td><font face="Courier">ROMAN (romanc.shx)</font></td> + </tr> + <tr> + <td><font face="Courier">Courier + CD_BOLD</font></td> + <td><font face="Courier">ROMAN_BOLD (romant.shx)</font></td> + </tr> + <tr> + <td><font face="Courier">Times</font></td> + <td><font face="Courier">ROMANTIC (rom_____.pfb)</font></td> + </tr> + <tr> + <td><font face="Courier">Times + CD_BOLD</font></td> + <td><font face="Courier">ROMANTIC_BOLD (romb_____.pfb)</font></td> + </tr> + <tr> + <td><font face="Courier">Helvetica</font></td> + <td><font face="Courier">SANSSERIF (sas_____.pfb)</font></td> + </tr> + <tr> + <td><font face="Courier">Helvetica + CD_BOLD</font></td> + <td><font face="Courier">SANSSERIF_BOLD (sasb____.pfb)</font></td> + </tr> + </table> + </center> +</div> +<h4>Colors</h4> +<ul> + <li><a href="../func/attributes.html#cdForeground"><font face="Courier"> + <strong> + Foreground</strong></font></a>: indexes<font face="Courier"> long int *color</font> in the fixed palette + (AutoCAD uses a 256-color palette - for further detail, see AutoCAD's Reference Manual).</li> + <li><a href="../func/attributes.html#cdBackground"><font face="Courier"> + <strong> + Background</strong></font></a>: does nothing, returns <font face="Courier">CD_WHITE</font>.</li> + <li><a href="../func/color.html#cdGetColorPlanes"><font face="Courier"> + <strong> + GetColorPlanes</strong></font></a>: returns 8.</li> + <li><a href="../func/color.html#cdPalette"><font face="Courier"><strong>Palette</strong></font></a>: + does nothing (the palette is fixed). </li> +</ul> +<h4>Client Images</h4> +<ul> + <li>All functions do nothing.</li> +</ul> +<h4>Server Images </h4> +<ul> + <li>All functions do nothing.</li> +</ul> +<p> </p> + +</body> + +</html> diff --git a/html/en/drv/emf.html b/html/en/drv/emf.html new file mode 100644 index 0000000..1f7b462 --- /dev/null +++ b/html/en/drv/emf.html @@ -0,0 +1,84 @@ +<!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>CD_EMF</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>CD_EMF - Enhanced Metafile Driver (cdemf.h)</h2> + + <p>This driver allows generating a Microsoft Windows Enhanced Metafile, the + format used by 32-bit Windows systems to store graphics primitives. Usually, + the filename has an extension "*.emf".</p> + <p>The driver works only in the Microsoft Windows platform, but you can use it + in other platforms without the risk of compilation error. If you attempt to + create a canvas in another platform, function <font face="Courier"><strong> + cdCreateCanvas</strong></font> will return NULL.</p> + +<h3>Use</h3> + + <p>The canvas is created by means of a call to function <font face="Courier"> + <a href="../func/init.html#cdCreateCanvas"> + <strong>cdCreateCanvas</strong></a>(CD_EMF, Data)</font>, after which other CD + functions can be called as usual. Parameter <font face="Courier">Data</font> + has the following format:</p> + + <pre><em>"filename widthxheight" </em>or in C <em>"<strong><tt>%s %dx%d</tt></strong>"</em></pre> + + <p>It must include the filename and the canvas' dimensions.<font face="Courier"> + </font>The filename must be inside double quotes (") if it has spaces.<font face="Courier"> + Width</font> and <font face="Courier">height</font> are provided in pixels + (note the lowercase "x" between them). Resolution (the number of pixels per + millimeter) is always the screen resolution.</p> + <p>Any amount of such canvases may exist simultaneously. Function + <font face="Courier"><strong>cdCreateCanvas</strong></font> <b>opens</b> the + file, and a call to function + <a href="../func/init.html#cdKillCanvas"> + <font face="Courier"><strong>cdKillCanvas</strong></font></a> is required to + <b>close</b> the file properly.</p> +<p>To use this driver in Windows using GDI+ is necessary to call +<font face="Courier"><strong> + cdUseContextPlus</strong></font><strong><font face="Courier">(1)</font></strong> +before creating the canvas. If you intend to use <strong>cdCanvasPlay</strong> +to interpret the EMF, then do not use GDI+ to generate the metafile. GDI+ +extensively use internal transformations that will affect the <strong> +cdCanvasPlay</strong> interpretation. Also some interior style will not be +correctly interpreted.</p> + +<h3>Behavior of Functions</h3> + + <p>This driver is greatly platform-dependent. For further detail, see the <b> + Behavior of Functions</b> of the <a href="win32.html">Microsoft Windows (GDI)</a> + or <a href="gdiplus.html">Windows Using GDI+</a> platform base drivers. It has + been noticed that EMF, when saved in the Windows 95 environment, is not + totally compatible with EMF saved in the Windows NT environment.</p> + +<h4>Control Functions</h4> +<ul> + <li><a href="../func/other.html#cdPlay"> + <font face="Courier"><strong>Play</strong></font></a>: different from the + basic driver, is implemented. Not implemented using GDI+.</li> + <li> + <a href="../func/control.html#cdClear"> + <font face="Courier"><strong>Clear</strong></font></a>: different from the + basic driver, does nothing.</li> +</ul> +<h4>Client Images </h4> +<ul> + <li> + <a href="../func/client.html#cdGetImageRGB"> + <font face="Courier"><strong>GetImageRGB</strong></font></a>: does nothing.</li> +</ul> +<h4>Server Images</h4> +<ul> + <li>All functions do nothing.</li> +</ul> + +</body> + +</html> diff --git a/html/en/drv/gdiplus.html b/html/en/drv/gdiplus.html new file mode 100644 index 0000000..e4a2810 --- /dev/null +++ b/html/en/drv/gdiplus.html @@ -0,0 +1,200 @@ +<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> + +<head> +<meta http-equiv="Content-Language" content="en"> +<title>GDI+</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>Microsoft Windows Base <em style="font-style: normal">Driver</em> Using GDI+</h2> + + <p>This driver represents a base driver for all system-dependent drivers implemented in the Microsoft Windows system, + but uses a new API called GDI+. The drivers <b>Clipboard, Native Window</b>, <b>IUP</b>, <b>Image</b>, <b>Printer</b>, + <b>EMF</b> and <b>Double Buffer</b> were implemented. The driver <b>WMF</b>, and the function <font face="Courier"> + <strong>cdPlay</strong></font> of the <b>Clipboard</b> and <b>EMF</b> drivers were not implemented using GDI+.</p> + <p>The main motivation for the use of GDI+ was transparency for all the primitives. Beyond that we got other features + like anti-aliasing, gradient filling, bezier lines and filled cardinal splines.</p> + <p>This driver still does not completely replace the GDI Windows base driver, because GDI+ does not have support for + XOR. Also the applications need to adapt the rendering of text that is slightly different from GDI. It is know that + GDI+ can be slower than GDI in some cases and faster in other cases, Microsoft does not make this clear.</p> + <p>So we let the programmer to choose what to use. We created the function <font face="Courier"><strong> + cdUseContextPlus</strong></font> that allows to activate or to deactivate the use of GDI+ for the available + Windows based drivers. + This function affects only the <font face="Courier"><strong>cdCreateCanvas</strong></font> function call, once created + the canvas will be always a GDI+ canvas. In fact the function affects primary the definitions + <font face="Courier"><strong>CD_NATIVEWINDOW</strong></font>, + <strong><span style="font-family: Courier">CD_IMAGE</span></strong>, <strong> + <span style="font-family: Courier">CD_PRINTER</span></strong>, <strong> + <span style="font-family: Courier">CD_EMF</span></strong>, <strong> + <span style="font-family: Courier">CD_DBUFFER</span></strong> and <strong> + <span style="font-family: Courier">CD_CLIPBOARD</span></strong>, because they are + function calls and not static defines.</p> + <p>Using GDI+ it is allowed to create more that one canvas at the same time for the same Window. And they can co-exist + with a standard GDI canvas.</p> + <p>To enable the use of GDI+ based drivers you must call the initialization function <font face="Courier"><strong> + cdInitContextPlus()</strong></font> once and link to the libraries "<strong>cdcontextplus.lib</strong>" and "<strong>gdiplus.lib</strong>". + Also the file "<strong>gdiplus.dll</strong>" must be available in your system. These files already came with Visual + C++ 7 and Windows XP. For other compilers or systems you will need to copy the ".lib" file for you libraries area, and + you will need to copy the DLL for the Windows\System (Win98/Me) or Windows\System32 (Win2000/NT4-SP6) folder. The + gdiplus files can be obtained from + <a href="http://www.microsoft.com/downloads/details.aspx?familyid=6a63ab9c-df12-4d41-933c-be590feaa05a&displaylang=en"> + Microsoft</a> or from <a href="../../download/gdiplus.zip">here</a>.</p> + <p>In CDLua it is not necessary any additional initialization, but the + application must still be linked with the <strong>cdcontextplus.lib</strong> + library or a <strong>require"cdluacontextplus"</strong> can be used when + using dynamic libraries.</p> + +<h3>Behavior of Functions</h3> +<h4>Control</h4> +<ul> + <li><a href="../func/other.html#cdPlay"><font face="Courier"><strong>Play</strong></font></a>: + does nothing, returns <font face="Courier">CD_ERROR</font>. </li> +</ul> +<h4>Coordinate System and Clipping</h4> +<ul> + <li><a href="../func/coordinates.html#cdUpdateYAxis"><font face="Courier"> + <strong>UpdateYAxis</strong></font></a>: the orientation of axis Y is the opposite to its orientation in the CD + library. Except when using transformations.</li> +</ul> +<h4>Primitives</h4> +<ul> + <li><font face="Courier"><strong><a href="../func/marks.html#cdPixel">Pixel</a></strong></font>: + uses GDI. Excepting when the canvas is an image so it is done using GDI+.</li> + <li><font face="Courier"><a href="../func/filled.html#cdSector"><b>Sector</b></a></font>: + it also draws an arc in the same position to complete the size of the sector.</li> + <li><font face="Courier"><a href="../func/text.html#cdText"><b>Text</b></a></font>: + opaque text is simulated using a rectangle in the back.</li> + <li><a href="../func/lines.html#cdBegin"><font face="Courier"><strong>Begin</strong></font></a>: + Beyond the standard modes it accepts the additional modes: <strong><tt>CD_FILLSPLINE</tt></strong> and <strong><tt> + CD_FILLGRADIENT</tt></strong>. The C definitions of these modes are available in the <b>cdgdiplus.h</b> header.<br> + <strong><tt><br> + CD_SPLINE</tt></strong> defines the points of a curve constructed by a cardinal spline. Uses the current line style.<br> + <strong><tt>CD_FILLSPLINE</tt></strong> defines the points of a filled curve constructed by a cardinal spline. Uses + the current interior style.<br> + <strong><tt>CD_FILLGRADIENT</tt></strong> defines the points of a filled polygon. It is filled with a gradient from + colors in each vertex to a color in its center. The colors are defined by the "<strong><tt>GRADIENTCOLOR</tt></strong>" + attribute, that must be set before each <strong><tt>cdVertex</tt></strong> call and before <strong><tt>cdEnd</tt></strong> + for the center color. This will not affect the current interior style.</li> +</ul> +<h4>Attributes </h4> +<ul> + <li><a href="../func/filled.html#cdBackOpacity"><font face="Courier"><strong> + BackOpacity</strong></font></a>: only changes the transparency of the background color to 0 (transparent) or 255 + (opaque).</li> + <li><a href="../func/filled.html#cdHatch"><font face="Courier"><strong>Hatch</strong></font></a>: + diagonal styles are drawn with anti-aliasing.</li> + <li><a href="../func/attributes.html#cdWriteMode"><font face="Courier"> + <strong> + WriteMode</strong></font></a>: does nothing. There is no support for XOR or NOT_XOR.</li> + <li><a href="../func/filled.html#cdPattern"><font face="Courier"><strong> + Pattern</strong></font></a>: each pixel can contain transparency information.</li> + <li><font face="Courier"><strong><a href="../func/lines.html#cdLineStyle"> + LineStyle</a></strong></font>: uses a custom GDI+ style when line width is 1. In World Coordinates the line style + has its scaled changed.</li> + <li><a href="../func/text.html#cdFontDim"><font face="Courier"><strong>FontDim</strong></font></a>: + the maximum width is estimated from the character "W".</li> + <li><font face="Courier"><strong><a href="../func/text.html#cdTextAlignment"> + TextAlignment</a></strong></font>: is simulated. Although GDI+ has text alignment, the results + do not match the CD text alignment.</li> + <li><a href="../func/text.html#cdNativeFont"><font face="Courier"><strong> + NativeFont</strong></font></a>: also accepts <em><strong>"-d"</strong></em><strong> + </strong> to show the font-selection dialog box.</li> + <li><a href="../func/text.html#cdFont"><font face="Courier"><strong>Font</strong></font></a>: + "System" is mapped to "MS Sans Serif", "Courier" is mapped to "Courier New", + "Helvetica" is mapped to "Arial", and "Times" is mapped to "Times New Roman". + Underline and Strikeout are supported.</li> +</ul> +<h4>Colors </h4> +<ul> + <li><a href="../func/color.html#cdPalette"><font face="Courier"><strong>Palette</strong></font></a>: + works only when the canvas is a server image.</li> + <li><a href="../func/attributes.html#cdForeground"><font face="Courier"> + <strong> + Foreground</strong></font></a> & + <a href="../func/attributes.html#cdBackground"> + <font face="Courier"><strong>Background</strong></font></a>: accepts the transparency information encoded in the + color.</li> +</ul> +<h4>Client Images </h4> +<ul> + <li><a href="../func/client.html#cdGetImageRGB"><font face="Courier"><strong> + GetImageRGB</strong></font></a>: uses GDI. Excepting when the canvas is an image so it is done using GDI+.</li> +</ul> +<h4>Server Images </h4> +<ul> + <li><strong><a href="../func/server.html#cdGetImage">GetImage</a></strong>: + uses GDI. Excepting when the canvas is an image so it is done using GDI+.</li> + <li><strong><a href="../func/server.html#cdScrollArea">ScrollArea</a></strong>: + uses GDI. Excepting when the canvas is an image so it is done using GDI+.</li> +</ul> +<h4>Exclusive Attributes</h4> +<ul> + <li>"<span style="font-family: Courier"><strong>GDI+</strong></span>": + returns "1". So the application can detect if the driver uses the GDI+ base + driver. Other drivers that do not implement this attribute will return NULL.</li> +</ul> +<ul> + <li>"<b><font face="Courier">HDC</font></b>": returns the HDC of the Win32 canvas. It can only be retrieved (get + only). In Lua is returned as a user data. It is not NULL only in some Native Windows canvas and in the printer canvas.</li> +</ul> +<ul> + <li>"<b><font face="Courier">ANTIALIAS</font></b>": controls the use of anti-aliasing + for the text, image zoom and line + drawing primitives. Assumes values "1" (active) and "0" (inactive). Default value: "1". </li> +</ul> +<ul> + <li>"<b><font face="Courier">GRADIENTCOLOR</font></b>": necessary for the creation of the gradient fill defined by a + polygon (see details in the function <font face="Courier"><strong>cdBegin</strong></font> above). Defines the color of + each vertex and the center (%d %d %d" = r g b). It can not be retrieved (set only).</li> +</ul> +<ul> + <li>"<b><font face="Courier">IMAGETRANSP</font></b>": defines an interval of colors to be considered transparent in + client and server images (except for RGBA images). It uses two colors to define the interval ("%d %d %d %d %d %d" = r1 + g1 b1 r2 g3 b3). Use NULL to remove the attribute. </li> +</ul> +<ul> + <li>"<b><font face="Courier">IMAGEFORMAT</font></b>": defines the number of bits per pixel used to create server + images. It uses 1 integer that can have the values: "32" or "24" (%d). Use NULL to remove the attribute. It is used + only in the <font face="Courier"><strong>cdCreateImage</strong></font>. When not defined, the server images use the + same format of the canvas.</li> +</ul> +<ul> + <li>"<strong><font face="Courier">IMAGEALPHA</font></strong>": allows the usage of an alpha channel for server + images if IMAGEFORMAT=32. The attribute format is a pointer to the transparency values in a sequence of chars in + the same format of alpha for client images. The attribute is used in the <strong> + <font face="Courier">cdCreateImage</font></strong> and for every <font face="Courier"><strong> + cdPutImageRect</strong></font>, the pointer must exists while the image exists. The alpha values are transfered to + the image only in <font face="Courier"><strong>cdPutImageRect</strong></font>, so they can be freely changed any time. + The data is not duplicated, only the pointer is stored. The size of the data must be the same size of the image. Use + NULL to remove the attribute. Not accessible in Lua.</li> +</ul> +<ul> + <li>"<b><font face="Courier">IMAGEPOINTS</font></b>": define 3 coordinates of a paralelogram that will be used + to warp server and client images in the subsequent calls of <font face="Courier"><strong>PutImage</strong></font> + functions. Use 6 integer values inside a string ("%d %d %d %d %d %d" = x1 y1 x2 y2 x3 y3). Use NULL to remove the + attribute. The destination rectangle of the <font face="Courier"><strong>PutImage</strong></font> functions will be + ignored. The respective specified points are the upper-left corner, the upper-right corner and the lower left corner. + In GDI+ this attribute is more complete than in GDI, because affects also client images.</li> +</ul> +<ul> + <li>"<b><font face="Courier">ROTATE</font></b>": allows the usage of 1 angle and 1 coordinate (x, y), that + define a global rotation transformation centered in the specified coordinate. Use 1 real and 2 integer values inside a + string ("%g %d %d" = angle x y).</li> +</ul> +<ul> + <li><b><font face="Courier">"LINEGRADIENT": </font></b>defines a filled interior style that uses a line gradient + between two colors. It uses 2 points ("%d %d %d %d" = x1 y1 x2 y2), one for the starting point using (using the + foreground color), and another one for the end point (using the background color).</li> +</ul> +<ul> + <li><b><font face="Courier">"LINECAP": </font></b>defines addicional line cap styles. It can have the following + values: "Triangle", "NoAnchor", "SquareAnchor", "RoundAnchor", "DiamondAnchor", or "ArrowAnchor". It can not be + retrieved (set only).</li> +</ul> + +</body> + +</html>
\ No newline at end of file diff --git a/html/en/drv/image.html b/html/en/drv/image.html new file mode 100644 index 0000000..f19b3b3 --- /dev/null +++ b/html/en/drv/image.html @@ -0,0 +1,57 @@ +<!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>CD_IMAGE</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>CD_IMAGE - Server Image Driver (cdimage.h)</h2> + + <p>This driver provides access to a Server Image, a memory-based + high-performance image that corresponds to the attributes of the system's + devices. It is used for offscreen drawings.</p> + +<h3>Use</h3> + + <p>The canvas is created by means of a call to function + <a href="../func/init.html#cdCreateCanvas"> + <font face="Courier"><strong>cdCreateCanvas</strong></font></a><font face="Courier">(CD_IMAGE, + Data)</font>, after which other functions in the CD library can be called as + usual. The function creates a CD canvas based on an existing Server Image. The + <font face="Courier">Data</font> parameter must be a pointer to an image + created with function + <a href="../func/server.html#cdCreateImage"> + <font face="Courier"><strong>cdCreateImage</strong></font></a>.</p> + <p>Any amount of such canvases may exist simultaneously. It is important to + note that a call to function + <a href="../func/init.html#cdKillCanvas"> + <font face="Courier"><strong>cdKillCanvas</strong></font></a> is required to + properly <b>end</b> the driver. You can call function + <a href="../func/server.html#cdKillImage"> + <font face="Courier"><strong>cdKillImage</strong></font></a> only after + calling <font face="Courier"><strong>cdKillCanvas</strong></font>.</p> + <p>For use with CDLUA, the Server Image passed as parameter must have been + created with function <strong><font face="Courier">cd.CreateImage</font></strong> + in Lua.</p> +<p>To use this driver in Windows using GDI+ is necessary to call +<font face="Courier"><strong> + cdUseContextPlus</strong></font><strong><font face="Courier">(1)</font></strong> +before creating the canvas.</p> + +<h3>Behavior of Functions</h3> + + <p>This driver is greatly platform-dependent. For further detail, see the <b> + Behavior of Functions</b> in each platform: <a href="win32.html">Microsoft + Windows (GDI)</a>, <a href="gdiplus.html">Windows Using GDI+</a>, + <a href="xwin.html">X-Windows (XLIB)</a>. However, it should be noted that + some functions behave differently from the basic functions of each platform.</p> + + +</body> + +</html> diff --git a/html/en/drv/irgb.html b/html/en/drv/irgb.html new file mode 100644 index 0000000..3ab71f4 --- /dev/null +++ b/html/en/drv/irgb.html @@ -0,0 +1,117 @@ +<!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>CD_IMAGERGB</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>CD_IMAGERGB - RGB Client Image Driver (cdirgb.h)</h2> + + <p>This driver allows access to a Client Image, an imaged based in RGB colors with 24 + or 32 bits per pixel (8 per channel). + It is used to implement high-quality offscreen drawings, but is slower than the Server Image version. In fact, it is a + rasterizer, that is, it converts vector primitives into a raster representation. All primitives are implemented by the + library and are not system-dependent (the primitives of the Server Image version are system-dependent).</p> + +<h3>Use</h3> + + <p>The canvas is created by means of a call to the function <font face="Courier"> + <a href="../func/init.html#cdCreateCanvas"><strong>cdCreateCanvas</strong></a>(CD_IMAGERGB, + Data)</font>, after which other functions in the CD library can be called as usual. The function creates an RGB image, + and then a CD canvas. The <font face="Courier">Data</font> parameter string has the following format:</p> + + <pre><em>"width<strong>x</strong>height [r g b] -<strong>r</strong>[resolution]"</em> in C "<em><strong><tt>%dx%d %p %p %p -r%g" +or +</tt></strong>"width<strong>x</strong>height [r g b a] -<strong>r</strong>[resolution] -<strong>a</strong>"</em> in C "<em><strong><tt>%dx%d %p %p %p %p -r%g -a"</tt></strong></em></pre> + + <p>It must include the canvas' dimensions.<font face="Courier"> Width</font> and <font face="Courier">height</font> + are provided in pixels (note the lowercase "x" between them). As an option, you can specify the buffers to be used by + the driver, so that you can draw over an existing image. The resolution can be defined with parameter + <font face="Courier">-r</font>; its default value is "3.78 pixels/mm" (96 DPI). </p> +<p>When the parameter -a is specified an alpha channel will be added to the +canvas underlying image. All primitives will be composed using an over operator +if the foreground or background colors have alpha components. This channel is +initialized with transparent (0). The other channels are initialized with white +(255, 255, 255). After drawing in the RGBA image the resulting alpha channel can +be used to compose the image in another canvas.</p> +<p>All channels are initialized only when allocated internally by the driver. +They are not initialized when allocated by the application.</p> + <p>Any amount of such canvases may exist simultaneously. It is important to note that a call to function + <a href="../func/init.html#cdKillCanvas"><strong>cdKillCanvas</strong></a> is required to + release internal allocated memory.</p> + <p>In Lua, the canvas can be created in two ways: with an already defined image or without it. With an image, an RGB + image must be passed as parameter, created by functions <strong> + <a href="../func/client.html#cdCreateImageRGB">cd.CreateImageRGB</a>,</strong> + <strong><a href="../func/client.html#cdCreateImageRGBA">cd.CreateImageRGBA</a></strong> or <strong> + <a href="../func/client.html#cdCreateBitmap">cd.CreateBitmap</a></strong> + in Lua. The resolution must be passed in an extra parameter after the image.</p> + +<h3>Exclusive Functions</h3> + +<h4><font face="Courier">cd.ImageRGB(canvas: cdCanvas) -> (imagergb: cdImageRGB +or cdImageRGBA) [in Lua]<br> +cd.ImageRGBBitmap(canvas: cdCanvas) -> (bitmap: cdBitmap) [in Lua]</font></h4> + + <p>Returns the canvas' internal image.</p> + +<h3>Behavior of Functions</h3> + + <p>All primitives are from the Simulation driver, see the <a href="sim.html">Simulation</a> driver's documentation for + further information.</p> + +<h4>Control</h4> +<ul> + <li><a href="../func/control.html#cdFlush"><font face="Courier"><strong>Flush</strong></font></a>: + does nothing.</li> + <li><a href="../func/other.html#cdPlay"><font face="Courier"><strong>Play</strong></font></a>: + does nothing, returns <font face="Courier">CD_ERROR</font>. </li> +</ul> +<h4>Coordinate System and Clipping </h4> +<ul> + <li><a href="../func/coordinates.html#cdUpdateYAxis"><font face="Courier"> + <strong>UpdateYAxis</strong></font></a>: does nothing. The axis orientation is the same as the CD library's.</li> +</ul> +<h4>Colors </h4> +<ul> + <li><a href="../func/color.html#cdGetColorPlanes"><font face="Courier"> + <strong> + GetColorPlanes</strong></font></a>: returns 24 if no alpha, returns 32 if + exists an alpha channel.</li> + <li><a href="../func/color.html#cdPalette"><font face="Courier"><strong>Palette</strong></font></a>: + does nothing.</li> + <li><a href="../func/attributes.html#cdForeground"><font face="Courier"> + <strong> + Foreground</strong></font></a> & + <a href="../func/attributes.html#cdBackground"> + <font face="Courier"><strong>Background</strong></font></a>: accepts the transparency information encoded in the + color.</li> +</ul> +<h4>Exclusive Attributes</h4> +<ul> + <li>"<strong><font face="Courier">REDIMAGE</font></strong>", "<strong><font face="Courier">GREENIMAGE</font></strong>", + "<strong><font face="Courier">BLUEIMAGE</font></strong>", "<span style="font-family: Courier"><strong>ALPHA</strong></span><strong><font face="Courier">IMAGE</font></strong>": return the respective pointers of the canvas image (read-only). Not accessible in Lua.</li> +</ul> + +<ul> + <li>"<b><font face="Courier">ANTIALIAS</font></b>": controls the use of anti-aliasing + for line primitives. Assumes values "1" (active) and "0" (inactive). Default value: "1". + Notice that text is always antialiased.</li> +</ul> + +<ul> + <li>"<b><font face="Courier">ROTATE</font></b>": allows the usage of 1 + angle and 1 coordinate (x, y), that define a global rotation transformation + centered in the specified coordinate. Use 1 real and 2 integer values inside a + string ("%g %d %d" = angle x y). In this driver will change the + current transformation matrix, if removed will reset the current + transformation matrix.</li> +</ul> + +</body> + +</html>
\ No newline at end of file diff --git a/html/en/drv/iup.html b/html/en/drv/iup.html new file mode 100644 index 0000000..90f11d9 --- /dev/null +++ b/html/en/drv/iup.html @@ -0,0 +1,65 @@ +<!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>CD_IUP</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>CD_IUP - IUP Driver (cdiup.h)</h2> + + <p>This driver provides access to an interface element of a IUP canvas. IUP is a portable user-interface library used + to create portable user-interface applications. See + <a target="_top" href="http://www.tecgraf.puc-rio.br/iup">IUP documentation</a>.</p> + +<h3>Use</h3> + + <p>The canvas is created by means of a call to the function <font face="Courier"> + <a href="../func/init.html#cdCreateCanvas"><strong>cdCreateCanvas</strong></a>(CD_IUP, + Data)</font>, after which other CD functions can be called as usual. This function creates a CD canvas based on the + existing IUP canvas. The parameter <font face="Courier">Data</font> is a pointer to a handle of the IUP canvas (<font face="Courier">Ihandle*</font>). + For use with CDLUA, a canvas created with IUPLUA must necessarily be passed as parameter.</p> + <p>Any amount of such canvases may exist simultaneously, but they should not use the same IUP canvas. It is important + to note that a call to function <a href="../func/init.html#cdKillCanvas"> + <font face="Courier"><strong>cdKillCanvas</strong></font></a> is required to <b>close</b> the file properly.</p> + <p>The CD canvas is automatically stored in the IUP canvas as the <strong>"<font face="Courier">_CD_CANVAS</font>"</strong> + attribute.</p> + + + + <p>To use this driver, it must be linked with the "<b><font face="Courier">iupcd</font></b>" + library available in the + IUP distribution. </p> + <p>In Lua, it is necessary to call function <strong><font face="Courier">cdluaiup_open() </font></strong>after a call + to function <strong><font face="Courier">cdlua_open()</font></strong>, apart from linking with the "<strong><font face="Courier">iupluacd</font></strong>" + library. To use with require must be require"iupluacd" or require"iupluacd51".</p> + <p>To use this driver in Windows using GDI+ is necessary to call + <font face="Courier"><strong> + cdUseContextPlus</strong></font><strong><font face="Courier">(1)</font></strong> + before creating the canvas.</p> + +<h3>Behavior of Functions</h3> + + <p>This driver is greatly platform-dependent, but little dependent on the IUP library. For further detail, see the <b> + Behavior of Functions</b> in each platform: <a href="win32.html">Microsoft Windows (GDI)</a>, <a href="gdiplus.html"> + Windows Using GDI+</a>, <a href="xwin.html">X-Windows (XLIB)</a>. However, it should be noted that some functions + behave differently from the basic functions of each platform.</p> + +<h4>Control </h4> +<ul> + <li><a href="../func/init.html#cdActivate"><font face="Courier"><strong> + cdCanvasActivate</strong></font></a>: updates the canvas size; the IUP canvas might have been resized.</li> +</ul> +<h4>Exclusive Attributes</h4> +<ul> + <li>"<b><font face="Courier">WINDOWRGN</font></b>": set the shape of a window to the current complex clipping region + (set only). If data is NULL the region is reset.</li> +</ul> + +</body> + +</html> diff --git a/html/en/drv/mf.html b/html/en/drv/mf.html new file mode 100644 index 0000000..c6157b9 --- /dev/null +++ b/html/en/drv/mf.html @@ -0,0 +1,80 @@ +<!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>CD_METAFILE</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>CD_METAFILE - CD Metafile Driver (cdmf.h)</h2> + + <p>This driver allows the generation of a CD Metafile, a very simple format that includes calls to functions of the CD + library and provides persistence to its primitives.</p> + +<h3>Use</h3> + + <p>The file is created by calling function <font face="Courier"> + <a href="../func/init.html#cdCreateCanvas"><strong>cdCreateCanvas</strong></a>(CD_METAFILE, + Data)</font>. The <font face="Courier">Data</font> parameter is a string that must contain the filename and the canvas + dimensions, in the following format:</p> + + <pre>"<i>filename </i>[widthxheight resolution]" or in <em>C use "<strong><tt>%s %gx%g %g</tt></strong>"</em></pre> + + <p>Only the parameter <font face="Courier">filename</font> is required. The filename must be inside double quotes (") + if it has spaces.<font face="Courier"> Width</font> and <font face="Courier">height</font> are provided in millimeters + (note the lowercase "x" between them), and their default value in pixels is <font face="Courier">INT_MAX</font> for + both dimensions. <font face="Courier">Resolution </font>is the number of pixels per millimeter; its default value is + "3.78 pixels/mm" (96 DPI). <font face="Courier">Width</font>, <font face="Courier">height</font> and + <font face="Courier">resolution</font> are real values.</p> + <p>Any amount of such canvases may exist simultaneously. It is important to note that a call to function + <a href="../func/init.html#cdKillCanvas"><font face="Courier"><strong> + cdKillCanvas</strong></font></a> is required to <b>close</b> the file properly.</p> + <p><b>Images - </b>Be careful when saving images in the file, because it uses a text format to store all numbers and + texts of primitives, including images, which significantly increases its size.</p> + <p><b>Extension -</b> Although this is not required, we recommend the extension used for the file to be ".MF".</p> + +<h3>Behavior of Functions</h3> +<h4>Coordinate System and Clipping </h4> +<ul> + <li><a href="../func/other.html#cdPlay"> + <font face="Courier"><strong>Play</strong></font></a>: implemented. </li> + <li><a href="../func/coordinates.html#cdUpdateYAxis"><font face="Courier"> + <strong>UpdateYAxis</strong></font></a>: does nothing.</li> + <li><b>Complex Regions</b>: not supported.</li> + <li><a href="../func/control.html#cdClear"><font face="Courier"><strong>Clear</strong></font></a>: + removes all primitives from the picture.</li> +</ul> +<h4>Attributes</h4> +<dir> + <li><a href="../func/text.html#cdFontDim"><font face="Courier"><strong>FontDim</strong></font></a>: + uses a size estimator, returning approximate values.</li> + <li><a href="../func/text.html#cdTextSize"><font face="Courier"><strong> + TextSize</strong></font></a>: uses a size estimator, returning approximate values.</li> +</dir> +<h4>Colors</h4> +<ul> + <li><a href="../func/color.html#cdGetColorPlanes"><font face="Courier"> + <strong> + GetColorPlanes</strong></font></a>: always returns 24.</li> +</ul> +<h4>Primitives</h4> +<ul> + <li>Floating point primitives are supported.</li> +</ul> +<h4>Client Images</h4> +<ul> + <li><a href="../func/client.html#cdGetImageRGB"><font face="Courier"><strong> + GetImageRGB</strong></font></a>: does nothing.</li> +</ul> +<h4>Server Images</h4> +<ul> + <li>All functions do nothing.</li> +</ul> + +</body> + +</html> diff --git a/html/en/drv/native.html b/html/en/drv/native.html new file mode 100644 index 0000000..20d182a --- /dev/null +++ b/html/en/drv/native.html @@ -0,0 +1,91 @@ +<!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=windows-1252"> +<title>CD_NATIVEWINDOW</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>CD_NATIVEWINDOW - Native Window Driver (cdnative.h)</h2> + + <p>This driver provides access to an existing Native Window, a basic element of the user-interface system. It also + provides access to other native handles like HDC handles in Windows.</p> + +<h3>Use</h3> + + <p>The canvas is created by means of a call to the function <font face="Courier"> + <a href="../func/init.html#cdCreateCanvas"><strong>cdCreateCanvas</strong></a>(CD_NATIVEWINDOW, + Data)</font>, after which other functions in the CD library can be called as usual. This function <b>creates</b> a CD + canvas based on an existing system canvas. The parameter <font face="Courier">Data</font> is a pointer to a handle of + the canvas. It is system-dependent, having a different meaning in each platform:</p> + + <p><strong>Microsoft Windows</strong>: can be the handle of the Windows window (<font face="Courier">HWND</font>), + or the handle of a previously created Device Context (<font face="Courier">HDC</font>), or can be a string in the + format "<font face="Courier">hdc width height</font>" or, in C, "<font face="Courier">%p %d %d</font>". + To get the entire screen use a NULL data.<br> + <strong>X-Windows</strong>: It is a string in the format "<font face="Courier">display window</font>" or, in C, "<font face="Courier"><tt>%p + %lu</tt></font>" (uses the default screen).</p> + + <p>The given parameters must exists until <font face="Courier"><strong>cdKillCanvas</strong></font> is called. The + <font face="Courier">HDC</font> is released only if created inside <font face="Courier"><strong>cdCreateCanvas</strong></font> + from an <font face="Courier">HWND</font> or when data is NULL.</p> + <p>Any amount of such canvases may exist simultaneously, but they should not use the same window, except if you are + using a GDI canvas and a GDI+ canvas at the same time for the same window.</p> + + <p>In CDLUA, the creation parameter must be a string in X-Windows and a userdata in Microsoft Windows.</p> +<p>To use this driver in Windows using GDI+ is necessary to call +<font face="Courier"><strong> + cdUseContextPlus</strong></font><strong><font face="Courier">(1)</font></strong> +before creating the canvas.</p> + +<h3>Exclusive Functions</h3> +<h4><font face="Courier">void cdGetScreenSize(int *width, int *height, double *width_mm, double *height_mm); [in C]<br> +<font face="Courier New" color="#808080">cd.Get</font></font><font color="#808080"><font face="Courier New">Screen</font><font face="Courier"><font face="Courier New">Size() +-> (width, heigth, mm_width, mm_height:</font> <i>number</i><font face="Courier New">)</font> [in Lua]</font></font></h4> + + <p>Equivalent to function <a href="../func/coordinates.html#cdGetCanvasSize"> + <font face="Courier"><b>cdCanvasGetSize</b></font></a>, but returns the values relative to the main screen of the + window system. It is not necessary to have an active canvas to call this function.</p> + +<h4><font face="Courier">int cdGetScreenColorPlanes(void); [in C]<br> +<font color="#808080">cd.GetScreenColorPlanes() -> (bpp: <em>number</em>) [in Lua</font>]</font></h4> + + <p>Equivalent to function <a href="../func/color.html#cdGetColorPlanes"> + <font face="Courier"><b>cdCanvasGetColorPlanes</b></font></a>, but returns the value relative to the main screen of the + window system. It is not necessary to have an active canvas to call this function.</p> + +<h3>Behavior of Functions</h3> + + <p>This driver is greatly platform-dependent. For further detail, see the <b>Behavior of Functions</b> in each + platform: <a href="win32.html">Microsoft Windows (GDI)</a>, <a href="gdiplus.html">Windows Using GDI+</a>, + <a href="xwin.html">X-Windows (XLIB)</a>. However, it should be noted that some functions behave differently from the + basic functions of each platform.</p> + +<h4>Control</h4> +<ul> + <li><a href="../func/init.html#cdActivate"><font face="Courier"><strong> + cdCanvasActivate</strong></font></a>: updates the canvas size; the window might have been resized. If the canvas was created + using a HDC, the size will not be updated. <br> + <br> + <span style="color: #FF0000"><strong>IMPORTANT</strong></span>: + For the standard Win32 base driver (not GDI+) if your Windows does not have one of the styles CS_OWNDC or CS_CLASSDC, + then a temporary HDC will be created everytime a <strong>cdCanvasActivate</strong> is called. To release this HDC call + <strong>cdCanvasDeactivate</strong> after + drawing. The IupCanvas control of the IUP library in the Win32 driver have the style, so + this should be ignored. But the IupCanvas in the GTK driver running in Win32 + does not have this style so + <strong>cdCanvasDeactivate</strong> should be used.</li> +</ul> +<h4>Exclusive Attributes</h4> +<ul> + <li>"<b><font face="Courier">WINDOWRGN</font></b>": set the shape of a window to the current complex clipping region + (set only). If data is NULL the region is reset.</li> +</ul> + +</body> + +</html> diff --git a/html/en/drv/pdf.html b/html/en/drv/pdf.html new file mode 100644 index 0000000..71ee6b7 --- /dev/null +++ b/html/en/drv/pdf.html @@ -0,0 +1,227 @@ +<!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>CD_PDF</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>CD_PDF - PDF Driver (cdpdf.h)</h2> + + <p>This drivers allows generating a PDF file. This format developed for representing documents in a manner that is + independent of the original application software, hardware, and operating system used to create those documents. The + format's copyrights are property of <a href="http://www.adobe.com" target="_top">Adobe Systems</a>. </p> + <p>This driver is very similar to the PS driver but it uses the PDFlib library to generate the PDF (<a href="http://www.pdflib.com/">http://www.pdflib.com/</a>). + There are two PDFlib licenses available, one commercial and one free with a flexible license, see + <a href="http://www.pdflib.org/purchase/license-lite.html">PDFlib Lite License</a>. The CD_PDF driver works with both + versions. </p> +<p>By default the pre-compiled library in the distribution uses the PDF Lite version code. The configuration of the PDF Lite code +included does not supports image + file formats. The current PDF Lite version is 7.0.2.</p> + <p>PDFlib Copyright (c) 1997-2007 Thomas Merz and PDFlib GmbH. All rights reserved. Applications that use this driver + are subject to the <a href="../../download/PDFlib-Lite-license.pdf">PDFlib GmbH License Agreement</a>.</p> + +<h3>Use</h3> + + <p>The file is created and opened by calling function <font face="Courier"> + <a href="../func/init.html#cdCreateCanvas"><strong>cdCreateCanvas</strong></a>(CD_PDF, + Data)</font>, in which <font face="Courier">Data</font> contains the filename and canvas dimensions. This function + opens the file and writes its header. Then, other functions in the CD library can be called as usual. The + <font face="Courier">Data</font> parameter string has the following format:</p> + + <pre>"<em>filename -p[paper] -w[width] -h[height] -s[resolution] [-o]</em>" +or in C<em> +"<strong><tt>%s -p%d -w%g -h%g -s%d -o</tt></strong>"</em></pre> + + <p>The filename must be inside double quotes (") if it has spaces. Any amount of such canvases may exist + simultaneously. It is important to note that a call to function + <a href="../func/init.html#cdKillCanvas"><font face="Courier"><strong> + cdKillCanvas</strong></font></a> is required to <b>close</b> the file properly.</p> + + + + <p>To use this driver, the application must be linked with the "<strong>cdpdf</strong>" + and "<strong>pdflib</strong>" libraries. </p> + <p><b>Paper Size - </b>The default paper size is A4. It is possible to change it by using one of the predefined sizes + - <strong><tt>CD_A0</tt></strong>, <strong><tt>CD_A1</tt></strong>, <strong><tt>CD_A2</tt></strong>, <strong><tt>CD_A3</tt></strong>, + <strong><tt>CD_A4</tt></strong>, <strong><tt>CD_A5</tt></strong>, <strong><tt>CD_LETTER</tt></strong> and <strong><tt> + CD_LEGAL</tt></strong> - with parameter "<font face="Courier">-p</font>". It is also possible to define a paper in a + particular size by using parameters "<font face="Courier">-w</font>" e "<font face="Courier">-h</font>". Values are + provided in millimeters.</p> + +<div align="center"> + <center> + <table border="1" cellpadding="3"> + <caption valign="top"><font size="4">Default Paper Sizes</font></caption> + <tr> + <td> </td> + <th>Width (mm)</th> + <th>Length (mm)</th> + </tr> + <tr> + <td><strong>A0</strong></td> + <td align="center">841</td> + <td align="center">1187</td> + </tr> + <tr> + <td><strong>A1</strong></td> + <td align="center">594</td> + <td align="center">841</td> + </tr> + <tr> + <td><strong>A2</strong></td> + <td align="center">420</td> + <td align="center">594</td> + </tr> + <tr> + <td><strong>A3</strong></td> + <td align="center">297</td> + <td align="center">420</td> + </tr> + <tr> + <td><strong>A4</strong></td> + <td align="center">210</td> + <td align="center">297</td> + </tr> + <tr> + <td><strong>A5</strong></td> + <td align="center">148</td> + <td align="center">210</td> + </tr> + <tr> + <td><strong>Letter</strong></td> + <td align="center">216</td> + <td align="center">279</td> + </tr> + <tr> + <td><strong>Legal</strong></td> + <td align="center">216</td> + <td align="center">356</td> + </tr> + </table> + </center> +</div> + + <p><b>Resolution -</b> Resolution is used to convert values from millimeters to pixels (the same as points, but the + number of points is per inch - DPI). Use parameter "<font face="Courier">-s</font>" to configure the resolution. The + default value is 300 DPI.</p> + <p><b>Orientation -</b> The page can be oriented as portrait or landscape. The default value is portrait, but when the + parameter "-o" is used, the horizontal and vertical values are switched.</p> + <p>In Lua, it is necessary to call function <strong><font face="Courier">cdluapdf_open() </strong> </font>after a call + to function <strong><font face="Courier">cdlua_open()</font></strong>, apart from linkediting with the "<strong><font face="Courier">cdluapdf</font></strong>" + library.</p> + +<h3>Behavior of Functions</h3> +<h4>Control</h4> +<ul> + <li><a href="../func/other.html#cdPlay"><font face="Courier"><strong>Play</strong></font></a>: + does nothing, returns <font face="Courier">CD_ERROR</font>. </li> + <li><a href="../func/control.html#cdFlush"><font face="Courier"><strong>Flush</strong></font></a>: + changes to a new page, preserving the previous one. </li> + <li><a href="../func/control.html#cdClear"><font face="Courier"><strong>Clear</strong></font></a>: + does nothing.</li> +</ul> +<h4>Coordinate System & Clipping</h4> +<ul> + <li><a href="../func/coordinates.html#cdUpdateYAxis"><font face="Courier"> + <strong>UpdateYAxis</strong></font></a>: does nothing.</li> + <li><b>Complex Regions</b>: not supported.</li> +</ul> +<h4>Attributes</h4> +<ul> + <li><a href="../func/attributes.html#cdBackground"><font face="Courier"> + <strong> + Background</strong></font></a> does nothing, returns <font face="Courier">CD_WHITE</font>.</li> + <li><a href="../func/filled.html#cdBackOpacity"><font face="Courier"><strong> + BackOpacity</strong></font></a>: does nothing, returns <font face="Courier">CD_TRANSPARENT</font>.</li> + <li><a href="../func/attributes.html#cdWriteMode"><font face="Courier"> + <strong> + WriteMode</strong></font></a>: does nothing, returns <font face="Courier">CD_REPLACE</font>.</li> + <li><a href="../func/filled.html#cdHatch"><font face="Courier"><strong>Hatch</strong></font></a>: + is always opaque.</li> + <li><a href="../func/filled.html#cdStipple"><font face="Courier"><strong> + Stipple</strong></font></a>: is always opaque.</li> + <li><a href="../func/text.html#cdFont"><font face="Courier"><strong>Font</strong></font></a>: + the old "System" font is mapped to the "Courier" font. For + the PDF core fonts styles are added to the font name, for other fonts styles + are simulated by PDFlib. Underline and Strikeout are supported. Following is the core fonts:</li> +</ul> +<pre>Courier, Courier-Bold, Courier-Oblique, Courier-BoldOblique, +Helvetica, Helvetica-Bold, Helvetica-Oblique, Helvetica-BoldOblique, +Times-Roman, Times-Bold, Times-Italic, Times-BoldItalic, +Symbol, +ZapfDingbats</pre> +<h4>Colors </h4> +<ul> + <li><a href="../func/color.html#cdGetColorPlanes"><font face="Courier"> + <strong> + GetColorPlanes</strong></font></a>: returns 24.</li> + <li><a href="../func/color.html#cdPalette"><font face="Courier"><strong>Palette</strong></font></a>: + does nothing. </li> +</ul> +<h4>Client Images</h4> +<ul> + <li><a href="../func/client.html#cdGetImageRGB"><font face="Courier"><strong> + GetImageRGB</strong></font></a>: does nothing.</li> + <li><font face="Courier"><strong><a href="../func/client.html#cdPutImageMap"> + PutImageMap</a></strong></font>: stores an RGB image.</li> +</ul> +<h4>Primitives</h4> +<ul> + <li><font face="Courier"><strong><a href="../func/marks.html#cdPixel">Pixel</a></strong></font>: + does not exist in PDF, is simulated using a circle with radius=1.</li> + <li>Floating point primitives are supported.</li> + <li>Filled primitves do not include the line at the edges of the filled area.</li> +</ul> +<h4>Server Images</h4> +<ul> + <li>All functions do nothing.</li> +</ul> +<h4>Exclusive Attributes</h4> +<ul> + <li><strong><font face="Courier">"POLYHOLE"</font></strong>: defines the index of +the vertex where there is a hole in a + closed polygon. It will affect the next <strong>cdEnd</strong>. Can be called several times between + <strong>cdBegin</strong> and <strong>cdEnd</strong> to define holes. The value passed must + be a string containing an integer ("%d"). If the value of the attribute passed is NULL, all holes will no longer be + considered. When consulted returns the current number of holes ("%d"). It can have a maximum of 500 holes. + Default: NULL.</li> +</ul> +<ul> + <li><strong><span style="font-family: Courier">"HATCHBOXSIZE"</span></strong>: + defines the size of smallest hatch box pattern. This affects the spacing + between the hatch lines. The value passed must be a string containing an + integer ("%d"). If the value of the attribute passed is NULL, the value is + rest to the default. When consulted returns the current value ("%d"). Default: + "8".</li> +</ul> +<ul> + <li>"<b><font face="Courier">ROTATE</font></b>": allows the usage of 1 angle and 1 coordinate (x, y), that + define a global rotation transformation centered in the specified coordinate. Use 1 real and 2 integer values inside a + string ("%g %d %d" = angle x y).</li> +</ul> +<ul> + <li>"<b><font face="Courier">OPAQUE</font></b>": allows the usage of a global + opacity value. The value passed must be a string containing an integer + ("%d") [0=full transparent, 255=full opaque]. Use NULL to reset to the + default. Default: 255.</li> +</ul> +<ul> + <li>"<b><font face="Courier">PATTERN</font></b>": creates a pattern with + regular primitives (except images). The value passed must be a string + containing two integeres with the pattern size ("%dx%d") [widthxheight]. + Just call regular primitives. Use NULL to end the pattern creation and set + the interior style.</li> +</ul> +<ul> + <li>"<b><font face="Courier">PDF</font></b>": Returns the "PDF*" handle + of the PDFLib.</li> +</ul> + +</body> + +</html> diff --git a/html/en/drv/picture.html b/html/en/drv/picture.html new file mode 100644 index 0000000..d702555 --- /dev/null +++ b/html/en/drv/picture.html @@ -0,0 +1,81 @@ +<!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>CD_METAFILE</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>CD_PICTURE - CD Picture (cdpicture.h)</h2> + + <p>This driver allows the creation of a CD Picture. It store primitives and + attributes in memory that can be played and resized in any other driver. It + does not includes clipping and WriteMode.</p> + +<h3>Use</h3> + + <p>The file is created by calling function <font face="Courier"> + <a href="../func/init.html#cdCreateCanvas"><strong>cdCreateCanvas</strong></a>(CD_PICTURE, + Data)</font>. The <font face="Courier">Data</font> parameter is a string that + can contain the resolution in the following format:</p> + + <pre>"[resolution]" or in <em>C use "<strong><tt>%lg</tt></strong>"</em></pre> + + <p><font face="Courier">Resolution </font>is the number of pixels per millimeter; its default value is + "3.78 pixels/mm" (96 DPI).</p> +<p>The canvas size is automatically calculated to be the bounding box of all the +primitives inside the picture.</p> + <p>Any amount of such canvases may exist simultaneously. It is important to note that a call to function + <a href="../func/init.html#cdKillCanvas"><font face="Courier"><strong> + cdKillCanvas</strong></font></a> is required to release the picture memory.</p> + +<h3>Behavior of Functions</h3> +<h4>Coordinate System and Clipping </h4> +<ul> + <li><a href="../func/other.html#cdPlay"> + <font face="Courier"><strong>Play</strong></font></a>: implemented. </li> + <li><a href="../func/coordinates.html#cdUpdateYAxis"><font face="Courier"> + <strong>UpdateYAxis</strong></font></a>: does nothing.</li> + <li><b><strong>Clipping</strong>:</b> not supported.</li> + <li><strong>Transformation Matrix</strong>: not supported.</li> + <li><a href="../func/coordinates.html#cdGetCanvasSize">cdGetCanvasSize</a>: + returns the size of the bounding box that includes all primitives inside the + picture.</li> +</ul> +<h4>Attributes</h4> +<dir> + <li><a href="../func/attributes.html#cdWriteMode"><font face="Courier"> + <strong> + WriteMode</strong></font></a>: does nothing.</li> + <li><a href="../func/text.html#cdFontDim"><font face="Courier"><strong>FontDim</strong></font></a>: + uses a size estimator, returning approximate values.</li> + <li><a href="../func/text.html#cdTextSize"><font face="Courier"><strong> + TextSize</strong></font></a>: uses a size estimator, returning approximate values.</li> +</dir> +<h4>Colors</h4> +<ul> + <li><a href="../func/color.html#cdGetColorPlanes"><font face="Courier"> + <strong> + GetColorPlanes</strong></font></a>: always returns 24.</li> +</ul> +<h4>Primitives</h4> +<ul> + <li>Floating point primitives are supported.</li> +</ul> +<h4>Client Images</h4> +<ul> + <li><a href="../func/client.html#cdGetImageRGB"><font face="Courier"><strong> + GetImageRGB</strong></font></a>: does nothing.</li> +</ul> +<h4>Server Images</h4> +<ul> + <li>All functions do nothing.</li> +</ul> + +</body> + +</html> diff --git a/html/en/drv/printer.html b/html/en/drv/printer.html new file mode 100644 index 0000000..d354fe2 --- /dev/null +++ b/html/en/drv/printer.html @@ -0,0 +1,83 @@ +<!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>CD_PRINTER</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>CD_PRINTER - Printer Driver (cdprint.h)</h2> + + <p>This driver provides access to a System Default Printer. </p> + <p>Currently, it works only in Microsoft Windows platforms, but it is possible + to use it in other platforms without the risk of compilation error. If you + attempt to create a canvas in another platform, the function + <a href="../func/init.html#cdCreateCanvas"> + <font face="Courier"><strong>cdCreateCanvas</strong></font></a> will return + NULL.</p> + +<h3>Use</h3> + + <p>The canvas is created by calling function <font face="Courier"> + <a href="../func/init.html#cdCreateCanvas"> + <strong>cdCreateCanvas</strong></a>(CD_PRINTER, Data)</font>, after which + other CD functions can be called as usual. The <font face="Courier">Data</font> + string has the following format:</p> + + <pre><span style="background-color: #CEE7FF">"</span><i>name </i>[-d]" <em> or in C style "</em><em><strong><tt>%s -d</tt></strong></em><em>"</em></pre> + + <p><font face="Courier">name</font> is an optional document name that will + appear in the printer queue. Optionally, <font face="Courier">-d</font> + displays the System Printer dialogue box before starting to print, allowing + you to configure the printer's parameters. When using this parameter and the + return canvas is NULL, one must assume that the print was canceled by the + user.</p> + <p>Any amount of such canvases may exist simultaneously. It is important to + note that a call to function + <a href="../func/init.html#cdKillCanvas"> + <font face="Courier"><strong>cdKillCanvas</strong></font></a> is required to + properly send the data to the printer.</p> + <p><b>Pages -</b> Use + <a href="../func/control.html#cdFlush"> + <font face="Courier"><strong>Flush</strong></font></a> to change to a new + page. You can draw first on page 1, then on page 2 and so forth.</p> +<p>To use this driver in Windows using GDI+ is necessary to call +<font face="Courier"><strong> + cdUseContextPlus</strong></font><strong><font face="Courier">(1)</font></strong> +before creating the canvas.</p> + +<h3>Behavior of Functions</h3> + + <p>This driver is greatly platform-dependent. For further detail, see the <b> + Behavior of Functions</b> in each platform: <a href="win32.html">Microsoft + Windows (GDI)</a>, <a href="gdiplus.html">Windows Using GDI+</a>, + <a href="xwin.html">X-Windows (XLIB)</a>. However, it should be noted that + some functions behave differently from the basic functions of each platform.</p> + <p>A printer created in Win32s has the same limitations as the + <a href="wmf.html">WMF driver</a>. In Windows 95 or NT, it has the same + limitations as the <a href="emf.html">EMF driver</a>.</p> + +<h4>Control</h4> +<ul> + <li> + <a href="../func/control.html#cdFlush"> + <font face="Courier"><strong>Flush</strong></font></a>: changes to a new + page, preserving the previous one. In the Win32 base driver, after the first + page, function <font face="Courier"><strong>cdText</strong></font> draws the + text below its correct position - we do not know why this happens.</li> +</ul> +<h4>Attributes </h4> +<ul> + <li> + <a href="../func/filled.html#cdHatch"> + <font face="Courier"><strong>Hatch</strong></font></a>: opaque in Win32 base + driver (GDI).</li> +</ul> + +</body> + +</html> diff --git a/html/en/drv/ps.html b/html/en/drv/ps.html new file mode 100644 index 0000000..7a2dc1a --- /dev/null +++ b/html/en/drv/ps.html @@ -0,0 +1,208 @@ +<!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>CD_PS</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>CD_PS - PostScript Driver (cdps.h)</h2> + + <p>This drivers allows generating a PostScript file. This format was created to be a high-quality graphics language + for printers and is currently supported by several printers. If your printer supports PostScript, you can send the + file generated by the driver directly to the printer port. Usually, the filename has an extension .PS or .EPS. The + driver generates level-2 PostScript, therefore some PostScript viewers might present errors. The format's copyrights + are property of <a href="http://www.adobe.com" target="_top">Adobe Systems</a>. </p> + +<h3>Use</h3> + + <p>The file is created and opened by calling function <font face="Courier"> + <a href="../func/init.html#cdCreateCanvas"><strong>cdCreateCanvas</strong></a>(CD_PS, + Data)</font>, in which <font face="Courier">Data</font> contains the filename and canvas dimensions. This function + opens the file and writes its header. Then, other functions in the CD library can be called as usual. The + <font face="Courier">Data</font> parameter string has the following format:</p> + + <pre>"<em>filename -p[paper] -w[width] -h[height] -l[left] -r[right] -b[bottom] -t[top] -s[resolution] [-e]</em> <em>[-g] [-o] [-1] d[margin]</em>"<em><br> +</em>or in C<em><br> +"<strong><tt>%s -p%d -w%g -h%g -l%g -r%g -b%g -t%g -s%d -e -o -1 -g -d%g</tt></strong>"</em></pre> + + <p>The filename must be inside double quotes (") if it has spaces. Any amount of such canvases may exist + simultaneously. It is important to note that a call to function + <a href="../func/init.html#cdKillCanvas"><font face="Courier"><strong> + cdKillCanvas</strong></font></a> is required to <b>close</b> the file properly.</p> + <p><b>Paper Size - </b>The default paper size is A4. It is possible to change it by using one of the predefined sizes + - <strong><tt>CD_A0</tt></strong>, <strong><tt>CD_A1</tt></strong>, <strong><tt>CD_A2</tt></strong>, <strong><tt>CD_A3</tt></strong>, + <strong><tt>CD_A4</tt></strong>, <strong><tt>CD_A5</tt></strong>, <strong><tt>CD_LETTER</tt></strong> and <strong><tt> + CD_LEGAL</tt></strong> - with parameter "<font face="Courier">-p</font>". It is also possible to define a paper in a + particular size by using parameters "<font face="Courier">-w</font>" e "<font face="Courier">-h</font>". Values are + provided in millimeters.</p> + +<div align="center"> + <center> + <table border="1" cellpadding="3"> + <caption valign="top"><font size="4">Default Paper Sizes</font></caption> + <tr> + <td> </td> + <th>Width (mm)</th> + <th>Length (mm)</th> + </tr> + <tr> + <td><strong>A0</strong></td> + <td align="center">841</td> + <td align="center">1187</td> + </tr> + <tr> + <td><strong>A1</strong></td> + <td align="center">594</td> + <td align="center">841</td> + </tr> + <tr> + <td><strong>A2</strong></td> + <td align="center">420</td> + <td align="center">594</td> + </tr> + <tr> + <td><strong>A3</strong></td> + <td align="center">297</td> + <td align="center">420</td> + </tr> + <tr> + <td><strong>A4</strong></td> + <td align="center">210</td> + <td align="center">297</td> + </tr> + <tr> + <td><strong>A5</strong></td> + <td align="center">148</td> + <td align="center">210</td> + </tr> + <tr> + <td><strong>Letter</strong></td> + <td align="center">216</td> + <td align="center">279</td> + </tr> + <tr> + <td><strong>Legal</strong></td> + <td align="center">216</td> + <td align="center">356</td> + </tr> + </table> + </center> +</div> + + <p><b>Margins -</b> The margins are controlled by parameters "<font face="Courier">-l</font>" "<font face="Courier">-r</font>" + "<font face="Courier">-t</font>" and "<font face="Courier">-b</font>" (<em>left, right, top, bottom</em>). Values are + provided in millimeters. Default margins are 25.4 mm to all parameters. You can draw only inside the margins.</p> + <p><b>Resolution -</b> Resolution is used to convert values from millimeters to pixels (the same as points, but the + number of points is per inch - DPI). Use parameter "<font face="Courier">-s</font>" to configure the resolution. The + default value is 300 DPI.</p> + <p><b>Orientation -</b> The page can be oriented as portrait or landscape. The default value is portrait, but when the + parameter "-o" is used, the horizontal and vertical values are switched.</p> + <p><b>EPS -</b> The PostScript file can be in an <strong>Encapsulated PostScript<b> </b></strong>format. For such, + simply specify the parameter "<font face="Courier">-e</font>". It is useful for other applications to import the + PostScript file. You can define the margins of the bounding box by means of parameter "<font face="Courier">-d</font>", + in millimeters.</p> + <p><b>Debug -</b> Parameter "<font face="Courier">-g</font>" adds a series of comments to the PS file, making the + beginning and end of a command from the CD library explicit. It is useful only for those who understand PostScript and + wish to identify a problem. It considerably increases the file size.</p> + <p><b>Level 1 -</b> Parameter "<font face="Courier">-1</font>" forces the driver to generate a level-1 PostScript. In + this case, pattern, stipple and hatch are not supported.</p> + <p><b>Pages -</b> Use function <font face="Courier">cdFlush</font> to change to a new page. The previous page will not + be changed.</p> + +<h3>Behavior of Functions</h3> +<h4>Control</h4> +<ul> + <li><a href="../func/other.html#cdPlay"><font face="Courier"><strong>Play</strong></font></a>: + does nothing, returns <font face="Courier">CD_ERROR</font>. </li> + <li><a href="../func/control.html#cdFlush"><font face="Courier"><strong>Flush</strong></font></a>: + changes to a new page, preserving the previous one. Does nothing in EPS mode.</li> + <li><a href="../func/control.html#cdClear"><font face="Courier"><strong>Clear</strong></font></a>: + does nothing.</li> +</ul> +<h4>Coordinate System & Clipping</h4> +<ul> + <li><a href="../func/coordinates.html#cdGetCanvasSize"><font face="Courier"> + <strong>GetCanvasSize</strong></font></a>: returns the page's size within the margins (drawing area).</li> + <li><a href="../func/coordinates.html#cdUpdateYAxis"><font face="Courier"> + <strong>UpdateYAxis</strong></font></a>: does nothing.</li> + <li><b>Complex Regions</b>: not supported.</li> +</ul> +<h4>Attributes</h4> +<ul> + <li><a href="../func/attributes.html#cdBackground"><font face="Courier"> + <strong> + Background</strong></font></a> does nothing, returns <font face="Courier">CD_WHITE</font>.</li> + <li><a href="../func/filled.html#cdBackOpacity"><font face="Courier"><strong> + BackOpacity</strong></font></a>: does nothing, returns <font face="Courier">CD_TRANSPARENT</font>.</li> + <li><a href="../func/attributes.html#cdWriteMode"><font face="Courier"> + <strong> + WriteMode</strong></font></a>: does nothing, returns <font face="Courier">CD_REPLACE</font>.</li> + <li><a href="../func/text.html#cdFontDim"><font face="Courier"><strong>FontDim</strong></font></a>: + is simulated.</li> + <li><a href="../func/text.html#cdTextSize"><font face="Courier"><strong> + TextSize</strong></font></a>: is simulated.</li> + <li><a href="../func/filled.html#cdHatch"><font face="Courier"><strong>Hatch</strong></font></a>: + is always opaque (to be implemented).</li> + <li><a href="../func/filled.html#cdStipple"><font face="Courier"><strong> + Stipple</strong></font></a>: is always opaque (to be implemented).</li> + <li><a href="../func/text.html#cdTextAlignment"><font face="Courier"><strong> + TextAlignment</strong></font></a>: <font face="Courier">Baseline</font> is the same as <font face="Courier">South</font>.</li> + <li><a href="../func/text.html#cdFont"><font face="Courier"><strong>Font</strong></font></a>: + old name "System" is mapped to "Courier". Styles are added to the Postscript + font name.</li> +</ul> +<h4>Colors </h4> +<ul> + <li><a href="../func/color.html#cdGetColorPlanes"><font face="Courier"> + <strong> + GetColorPlanes</strong></font></a>: returns 24.</li> + <li><a href="../func/color.html#cdPalette"><font face="Courier"><strong>Palette</strong></font></a>: + does nothing. </li> +</ul> +<h4>Client Images</h4> +<ul> + <li><a href="../func/client.html#cdGetImageRGB"><font face="Courier"><strong> + GetImageRGB</strong></font></a>: does nothing.</li> + <li><font face="Courier"><strong><a href="../func/client.html#cdPutImageMap"> + PutImageMap</a></strong></font>: stores an RGB image in the file (to be implemented).</li> + <li><a href="../func/client.html#cdPutImageRGBA"><font face="Courier"><strong> + PutImageRGBA</strong></font></a>: alpha is ignored (to be implemented).</li> +</ul> +<h4>Primitives</h4> +<ul> + <li><font face="Courier"><strong><a href="../func/marks.html#cdPixel">Pixel</a></strong></font>: + does not exist in PS, is simulated using a circle with radius=1.</li> + <li>Floating point primitives are supported.</li> + <li>Filled primitves do not include the line at the edges of the filled area.</li> +</ul> +<h4>Server Images</h4> +<ul> + <li>All functions do nothing.</li> +</ul> +<h4>Exclusive Attributes</h4> +<ul> + <li>"<strong><font face="Courier">POLYHOLE</font></strong>": defines the index of + the vertex where there is a hole in a + closed polygon. It will affect the next <strong>cdEnd</strong>. Can be called several times between + <strong>cdBegin</strong> and <strong>cdEnd</strong> to define holes. The value passed must + be a string containing an integer ("%d"). If the value of the attribute passed is NULL, all holes will no longer be + considered. When consulted returns the current number of holes ("%d"). It can have a maximum of 500 holes.</li> +</ul> +<ul> + <li>"<b><font face="Courier">CMD</font></b>": saves a string directly to the file. Allows adding PostScript commands + to the file generated by the CD library. (set only)</li> +</ul> +<ul> + <li>"<b><font face="Courier">ROTATE</font></b>": allows the usage of 1 angle and 1 coordinate (x, y), that + define a global rotation transformation centered in the specified coordinate. Use 1 real and 2 integer values inside a + string ("%g %d %d" = angle x y).</li> +</ul> + +</body> + +</html> diff --git a/html/en/drv/sim.html b/html/en/drv/sim.html new file mode 100644 index 0000000..85a4e7f --- /dev/null +++ b/html/en/drv/sim.html @@ -0,0 +1,90 @@ +<html> + +<head> +<meta http-equiv="Content-Language" content="en-us"> +<title>Simulation</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>Simulation Base Driver</h2> + + <p>The Simulation driver was created to simulate functions that were not supported by some CD drivers. It works + jointly with the other driver (known as "client"), using its pixel, line and text functions to simulate arcs, sectors, + polygons, boxes, and fillings with styles.</p> + <p><b>Important:</b> All simulation primitives are based in the client's Pixel, Image and/or Line functions.</p> + +<h3>Use</h3> + + <p>The Simulation driver is used in several parts of the CD library.</p> + <p>In many drivers, the behavior of a given primitive may not be the expected. Usually this is documented in the + manual. If you wish to activate the simulation of a primitive, simply call function <strong> + <font face="Courier"><a href="../func/init.html#cdSimulate">cdSimulate</a></font></strong> + with the code of the primitive to be simulated.</p> + +<h3>Behavior of Functions</h3> +<h4>Clipping</h4> +<ul> + <li>Clipping is not implemented in the simulation base driver. The primary + driver must implement its own clipping.</li> +</ul> +<h4>Attributes</h4> +<ul> + <li><a href="../func/filled.html#cdLineCap"><font face="Courier"><strong> + LineCap</strong></font></a>: only <font face="Courier">CD_CAPFLAT</font> is supported.</li> + <li><a href="../func/filled.html#cdLineJoin"><font face="Courier"><strong> + LineJoin</strong></font></a>: only <font face="Courier">CD_MITER</font> is supported.</li> + <li><font face="Courier"><strong><a href="../func/lines.html#cdLineStyle"> + LineStyle</a></strong></font>: If line width is greater than 1, the style is + always continuous.</li> + <li><a href="../func/text.html#cdFont"><font face="Courier"><strong>Font</strong></font></a>: + Selects a True Type font file for the + <a target="_blank" href="http://www.freetype.org/">FreeType</a> library to + render the text. Notice that TTF fonts have different files for different font styles, like bold and italic. Font files can be in the + current directory, in the directory pointed by the CDDIR environment variable, in Windows in the system defined Font + directory, or using the full path of the file. <br> + Old name "System" is mapped to "Courier". For the know font names "Courier" (<font face="Courier">cour</font>), + "Times" (<font face="Courier">times</font>) and "Helvetica" (<font face="Courier">arial</font>), + the styles are added to the font file name as a suffix: "bd", "i" and "bi" are + used for bold, italic and bold-italic. For other fonts, it will first check + for a font map added using the attribute <strong>ADDFONTMAP</strong>, if + failed it will try to load the type_face name without any change, if fail it + will add the style suffix to the type_face and try to load again. The ".ttf" + file extension is always automatically added to the end of the file name.</li> +</ul> +<h4><strong>Primitives</strong> </h4> +<ul> + <li><b><font face="Courier"><a href="../func/marks.html#cdPixel">Pixel</a></font></b>: + always uses the client's pixel function. When clipping simulation is active, it executes area and polygon clipping.</li> + <li><font face="Courier"><a href="../func/lines.html#cdLine"><b>Line</b></a></font>: + draws lines pixel per pixel.</li> + <li><font face="Courier"><strong><a href="../func/lines.html#cdRect">Rect</a></strong></font>: + simulated using the client's <strong>Line</strong>.</li> + <li><font face="Courier"><a href="../func/lines.html#cdArc"><b>Arc</b></a></font>: + simulated using the client's <strong>Line</strong>. </li> + <li><font face="Courier"><a href="../func/filled.html#cdSector"><b>Sector</b></a></font>: + simulated using the client's <strong>Poly</strong>. </li> + <li><font face="Courier"><b><a href="../func/filled.html#cdChord">Chord</a></b></font>: + simulated using the client's <strong>Poly</strong></li> + <li><font face="Courier"><a href="../func/filled.html#cdBox"><b>Box</b></a></font>: + simulated using the client's <strong>Poly</strong>. </li> + <li><font face="Courier"><b><a href="../func/lines.html#cdBegin">Begin</a></b></font>, + <font face="Courier"><a href="../func/lines.html#cdVertex"><b>Vertex</b></a></font> + and <font face="Courier"><a href="../func/lines.html#cdEnd"><b>End</b></a></font>: + simulate using the <strong>Line</strong> or <strong>Pixel</strong> functions, depending on the interior style.</li> + <li><font face="Courier"><a href="../func/text.html#cdText"><b>Text</b></a></font>: + text simulation is made using TrueType font files in a transparent way for the + user. Oriented text is not supported.</li> +</ul> + +<h4>Exclusive Attributes</h4> +<ul> + <li>"<strong>ADDFONTMAP</strong>": Add a font map between a type face + name and a file name. It has the format "Type Face=filename", For ex: "Arial + Narrow Bold=ARIALNB". "Type Face" is not case sensitive.</li> +</ul> + +</body> + +</html> diff --git a/html/en/drv/win32.html b/html/en/drv/win32.html new file mode 100644 index 0000000..53ac2a5 --- /dev/null +++ b/html/en/drv/win32.html @@ -0,0 +1,137 @@ +<!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=windows-1252"> +<title>Windows</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>Microsoft Windows Base Driver</h2> + + <p>This driver represents a base driver for all system-dependent drivers implemented in the Microsoft Windows system. + The implementation uses Win32 API graphics functions, the GDI. The driver works better in Windows NT, but it may also + work in Windows 9x/Me.</p> + +<h3>Behavior of Functions</h3> +<h4>Control </h4> +<ul> + <li><a href="../func/control.html#cdFlush"><font face="Courier"><strong>Flush</strong></font></a>: + does nothing.</li> + <li><a href="../func/other.html#cdPlay"><font face="Courier"><strong>Play</strong></font></a>: + does nothing, returns <font face="Courier">CD_ERROR</font>. </li> +</ul> +<h4>Coordinate System and Clipping </h4> +<ul> + <li><a href="../func/coordinates.html#cdUpdateYAxis"><font face="Courier"> + <strong>UpdateYAxis</strong></font></a>: the orientation of axis Y is the opposite to its orientation in the CD + library.</li> +</ul> +<h4>Primitives</h4> +<ul> + <li><a href="../func/text.html#cdText"><font face="Courier"><strong>Text</strong></font></a>: + when Write Mode is <strong><tt>XOR</tt></strong> or <strong><tt>NOT_XOR</tt></strong>, the XOR effect is simulated + using bitmaps.</li> + <li><font face="Courier"><strong><a href="../func/lines.html#cdLine">Line</a></strong></font>: + needs to draw an extra pixel in the final position.</li> +</ul> +<h4>Attributes </h4> +<ul> + <li><a href="../func/attributes.html#cdWriteMode"><font face="Courier"> + <strong> + WriteMode</strong></font></a>: for the client and server image functions, the mode <strong><tt>NOT_XOR</tt></strong> + works as <strong><tt>XOR</tt></strong>.</li> + <li><a href="../func/filled.html#cdStipple"><font face="Courier"><strong> + Stipple</strong></font></a>: is always opaque. If not in Windows NT and if <font face="Courier">width</font> or + <font face="Courier">height</font> are greater than 8, the stipple is simulated using non-regular Windows clipping + regions and bitmaps. The simulation is made when filled boxes, sectors and polygons are drawn.</li> + <li><a href="../func/filled.html#cdPattern"><font face="Courier"><strong> + Pattern</strong></font></a>: If not in Windows NT and if <font face="Courier">width</font> or <font face="Courier"> + height</font> are greater than 8, the pattern is simulated using non-regular Windows clipping regions and bitmaps. The + simulation is made when filled boxes, sectors and polygons are drawn.</li> + <li><a href="../func/lines.html#cdLineWidth"><font face="Courier"><strong> + TextAlignment</strong></font></a>: the vertical alignment of CD_CENTER, CD_EAST, CD_WEST is manually calculated.</li> + <li><a href="../func/lines.html#cdLineWidth"><font face="Courier"><strong> + LineWidth</strong></font></a>: If not in Windows NT line width is always 1. If line width is 1, then a cosmetic pen + is used for fast drawing.</li> + <li><font face="Courier"><strong><a href="../func/lines.html#cdLineStyle"> + LineStyle</a></strong></font>: If line width is 1, the style is a little different from when line width is not 1, + because a cosmetic pen is used for width=1.</li> + <li><a href="../func/text.html#cdNativeFont"><font face="Courier"><strong> + NativeFont</strong></font></a>: also accepts <em><strong>"-d"</strong></em><strong> + </strong> to show the font-selection dialog box.</li> + <li><a href="../func/text.html#cdFont"><font face="Courier"><strong>Font</strong></font></a>: + "Courier" is mapped to "Courier New", "Helvetica" is mapped to "Arial", and + "Times" is mapped to "Times New Roman". Underline and + Strikeout are supported. The System font does not have orientation.</li> +</ul> +<h4>Client Images </h4> +<ul> + <li><font face="Courier"><strong><a href="../func/client.html#cdPutImageRGBA"> + PutImageRGBA</a></strong></font>: Try to use the new GDI function AlphaBlend, if not available captures an image + from the canvas to blend it manually.</li> +</ul> +<h4>Colors </h4> +<ul> + <li><a href="../func/color.html#cdPalette"><font face="Courier"><strong>Palette</strong></font></a>: + is useful only if the device has 256 colors. If it has less than 256 colors, ignore this function, for it will not + make much difference. If two different canvases have their palettes modified, the last one to be modified will have + the best quality; the other one will not have good quality and the colors might have a completely different + appearance.</li> +</ul> +<h4>Exclusive Attributes</h4> +<ul> + <li>"<b><font face="Courier">HDC</font></b>": returns the HDC of the Win32 canvas. It can only be retrieved (get + only). In Lua is returned as a user data.</li> +</ul> +<ul> + <li>"<strong><font face="Courier">PENFILLPOLY</font></strong>": controls the polygon filling outline. Assumes values + "1" (active) and "0" (inactive). Default value: "1". When a filled polygon is drawn, a line in the same color is used + to draw the border which is not included in the filling. Deactivating this attribute solves the problem of polygons + with holes, in which there is a line connecting the external polygon to the internal polygon.</li> +</ul> +<ul> + <li>"<b><font face="Courier">IMAGEFORMAT</font></b>": defines the number of bits per pixel used to create server + images. It uses 1 integer that can have the values: "32" or "24" (%d). Use NULL to remove the attribute. It is used + only in the <font face="Courier"><strong>cdCreateImage</strong></font>. When not defined, the server images use the + same format of the canvas.</li> +</ul> +<ul> + <li>"<strong><font face="Courier">IMAGEALPHA</font></strong>": allows the usage of an alpha channel for server + images if IMAGEFORMAT=32. The attribute format is a pointer to the transparency values in a sequence of chars in + the same format of alpha for client images. The attribute is used only in the <font face="Courier"><strong> + cdCreateImage</strong></font> and for every <font face="Courier"><strong> + cdPutImageRect</strong></font>, the pointer must exists while the image exists. The alpha values are transfered to + the image only in <font face="Courier"><strong>cdPutImageRect</strong></font>, so they can be freely changed any time. + It will use the <strong><font face="Courier">AlphaBlend</font></strong> GDI + function. The data is not duplicated, only the pointer is stored. The size of + the data must be the same size of the image. Use NULL to remove the attribute. + Not accessible in Lua.</li> +</ul> +<ul> + <li>"<strong><font face="Courier">IMAGEMASK</font></strong>": defines a binary transparency mask for server + images. The format is the same of a stipple, can contain only 0s and 1s. Use 2 integers, width and height, and a char + pointer to the mask values inside a string ("%d %d %p"). Use NULL to remove the attribute. It can not be retrieved + (set only). Not accessible in Lua. It will use the <font face="Courier"><strong>MaskBlt</strong></font> + GDI function.</li> +</ul> +<ul> + <li>"<b><font face="Courier">IMAGEPOINTS</font></b>": define 3 coordinates of a paralelogram that will be used + to warp server images. Use 6 integer values inside a string ("%d %d %d %d %d %d" = x1 y1 x2 y2 x3 y3). Use NULL to + remove the attribute. The respective specified points are the upper-left corner, the upper-right corner and the lower + left corner. The drawing is also affected by the "IMAGEMASK" attribute. It will use the <font face="Courier"><strong> + PlgBlt</strong></font> GDI function. </li> +</ul> +<ul> + <li>"<b><font face="Courier">ROTATE</font></b>": allows the usage of 1 + angle and 1 coordinate (x, y), that define a global rotation transformation + centered in the specified coordinate. Use 1 real and 2 integer values inside a + string ("%g %d %d" = angle x y).</li> +</ul> + +</body> + +</html>
\ No newline at end of file diff --git a/html/en/drv/wmf.html b/html/en/drv/wmf.html new file mode 100644 index 0000000..aa92c68 --- /dev/null +++ b/html/en/drv/wmf.html @@ -0,0 +1,116 @@ +<!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>CD_WMF</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>CD_WMF - Windows Metafile Driver (cdwmf.h)</h2> + + <p>This driver allows creating a Microsoft Windows Metafile, the format used + by 16-bit Windows systems to store graphics primitives. Usually, the filename + has an extension "*.wmf".</p> + <p>The driver works only in the Microsoft Windows platform, but you can use it + in other platforms without the risk of compilation error. If you attempt to + create a canvas in another platform, function <font face="Courier"><strong> + cdCreateCanvas</strong></font> will return NULL.</p> +<p><span style="color: #FF0000"><strong>It is recomended to use EMF instead of WMF whenever is possible.</strong></span> </p> + +<h3>Use</h3> + + <p>The canvas is created by means of a call to the function + <font face="Courier"> + <a href="../func/init.html#cdCreateCanvas"> + <strong>cdCreateCanvas</strong></a>(CD_WMF, Data)</font>, after which other + functions in the CD library can be called as usual. The <font face="Courier"> + Data</font> parameter string has the following format:</p> + + <pre><em>"filename widthxheight </em>[resolution]<em>" </em>or in C <em>"<strong><tt>%s + %dx%d</tt></strong> <strong>%g</strong>"</em></pre> + + <p>The file's name and dimensions are required. <font face="Courier">Width</font> + and <font face="Courier">height</font> are provided in pixels (note the + lowercase "x" between them). <font face="Courier">Resolution</font> is the + number of pixels per millimeter; its default value is the screen resolution.</p> + <p>Any amount of such canvases may exist simultaneously. Function + <font face="Courier"><strong>cdCreateCanvas</strong></font> creates a + memory-based metafile, and a call to function + <a href="../func/init.html#cdKillCanvas"> + <font face="Courier"><strong>cdKillCanvas</strong></font></a> is required to + <b>close</b> the file properly.</p> + <p>In fact the driver uses a slightly different format, called Aldus Placeable + Metafile (APM). It attaches a small header to the beginning of the file, + allowing other applications to import better the metafile contents.</p> + <p>This + driver is NOT available for the GDI+ base driver.</p> + +<h3>Behavior of Functions</h3> + + <p>This driver is greatly platform-dependent. For further detail, see the <b> + Behavior of Functions</b> of the <a href="drv/win32.html">Microsoft Windows + (GDI)</a> platform. However, it should be noted that some functions behave + differently from the basic functions of each platform.</p> + +<h4>Control </h4> +<ul> + <li><a href="../func/other.html#cdPlay"> + <font face="Courier"><strong>Play</strong></font></a>: different from the + basic driver, is implemented.</li> + <li> + <a href="../func/control.html#cdClear"> + <font face="Courier"><strong>Clear</strong></font></a>: different from the + basic driver, does nothing.</li> +</ul> +<h4>Coordinate System and Clipping </h4> +<ul> + <li> + <a href="../func/clipping.html#cdClip"> + <font face="Courier"><strong>Clip</strong></font></a>: does nothing, returns + <font face="Courier">CD_CLIPOFF</font>.</li> +</ul> +<h4>Attributes </h4> +<ul> + <li> + <a href="../func/filled.html#cdStipple"> + <font face="Courier"><strong>Stipple</strong></font></a>: is always opaque + and smaller than 8x8 pixels.</li> + <li> + <a href="../func/filled.html#cdPattern"> + <font face="Courier"><strong>Pattern</strong></font></a>: does nothing.</li> + <li> + <a href="../func/lines.html#cdLineWidth"> + <font face="Courier"><strong>LineWidth</strong></font></a>: is always 1.</li> + <li> + <a href="../func/text.html#cdTextAlignment"> + <font face="Courier"><strong>TextAlignment</strong></font></a>: + <font face="Courier">CD_CENTER/CD_WEST/CD_EAST</font> is saved as + <font face="Courier">CD_BASE_CENTER/CD_BASE_LEFT/CD_BASE_RIGHT</font>, but the + position error is compensated.</li> + <li> + <a href="../func/text.html#cdTextOrientation"> + <font face="Courier"><strong>TextOrientation</strong></font></a>: does + nothing</li> +</ul> +<h4>Client Images </h4> +<ul> + <li> + <a href="../func/client.html#cdGetImageRGB"> + <font face="Courier"><strong>GetImageRGB</strong></font></a>: does nothing.</li> + <li> + <a href="../func/client.html#cdPutImageRGBA"> + <font face="Courier"><strong>PutImageRGBA</strong></font></a>: the alpha + component is ignored.</li> +</ul> +<h4>Server Images</h4> +<ul> + <li>All functions do nothing.</li> +</ul> + +</body> + +</html> diff --git a/html/en/drv/xrender.html b/html/en/drv/xrender.html new file mode 100644 index 0000000..6970e29 --- /dev/null +++ b/html/en/drv/xrender.html @@ -0,0 +1,152 @@ +<!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>X-Windows</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +</head> + +<body> + +<h2>XRender Base Driver</h2> + + <p>This driver represents a basic driver for all system-dependent drivers + implemented in the X-Windows system using the XRender extension. The implementation uses the + XRender and Xft API functions.</p> + <p>The main motivation for the use of XRender was transparency for all the primitives. Beyond that we got other features + like anti-aliasing, gradient filling and transformations.</p> + <p>This driver still does not completely replace the X-Windows base driver, because + XRender does not have support for + XOR and for line styles.</p> + <p>So we let the programmer to choose what to use. We created the function <font face="Courier"><strong> + cdUseContextPlus</strong></font> that allows to activate or to deactivate the use of + X-Render for the available X-Windows based drivers. + This function affects only the <font face="Courier"><strong>cdCreateCanvas</strong></font> function call, once created + the canvas will be always a XRender canvas. In fact the function affects primary the definitions + <font face="Courier"><strong>CD_NATIVEWINDOW</strong></font>, + <strong><span style="font-family: Courier">CD_IMAGE</span></strong> and <strong> + <span style="font-family: Courier">CD_DBUFFER</span></strong>, because they are + function calls and not static defines.</p> + <p>Using XRender it is allowed to create more that one canvas at the same time for the same Window. And they can co-exist + with a standard X-Windows canvas.</p> + <p>To enable the use of XRender based drivers you must call the initialization function <font face="Courier"><strong> + cdInitContextPlus()</strong></font> once and link to the libraries "<strong>cdcontextplus</strong>", "<strong>Xrender</strong>" and "<strong>Xft</strong>". + Also the libraries "<strong>Xrender</strong>" and "<strong>Xft</strong>" + must be installed in your system. The XRender extension must be available in + the X-Windows server for the driver to work.</p> +<p>Currently, pre-compiled binaries are available for Linux, Darwin +and FreeBSD54. It is not available for the systems we have with AIX, SunOS and +IRIX.</p> + <p>In CDLua it is not necessary any additional initialization, but the + application must still be linked with the <strong>cdcontextplus.lib</strong> + library or a <strong>require"cdluacontextplus"</strong> can be used when + using dynamic libraries.</p> + +<h3>Behavior of Functions</h3> +<h4>Control </h4> +<ul> + <li><a href="../func/other.html#cdPlay"> + <font face="Courier"><strong>Play</strong></font></a>: does nothing, returns + <font face="Courier">CD_ERROR</font>. </li> +</ul> +<h4>Coordinate System and Clipping </h4> +<ul> + <li> + <a href="../func/coordinates.html#cdUpdateYAxis"> + <font face="Courier"><strong>UpdateYAxis</strong></font></a>: the + orientation of axis Y is the opposite to its orientation in the CD library. + Except when using transformations.</li> +</ul> +<h4>Primitives</h4> +<ul> + <li><font face="Courier"><a href="../func/lines.html#cdLine"><b>Line</b></a></font>: + simulated using the client's <strong>Poly</strong>.</li> + <li><a href="../func/text.html#cdText"><font face="Courier"><strong>Text</strong></font></a>: + Generic transformation + matrix affects only the position of the text. Complex clipping regions can not + contain text regions.</li> + <li><a href="../func/lines.html#cdBegin"> + <font face="Courier"><strong>Begin</strong></font></a>: <strong><tt> + CD_BEZIER</tt></strong> is simulated with lines.</li> + <li><font face="Courier"><strong><a href="../func/lines.html#cdRect">Rect</a></strong></font>: + simulated using the client's <strong>Line</strong>.</li> + <li><font face="Courier"><a href="../func/lines.html#cdArc"><b>Arc</b></a></font>: + simulated using the client's <strong>Line</strong>. </li> + <li><font face="Courier"><a href="../func/filled.html#cdSector"><b>Sector</b></a></font>: + simulated using the client's <strong>Poly</strong>. </li> + <li><font face="Courier"><b><a href="../func/filled.html#cdChord">Chord</a></b></font>: + simulated using the client's <strong>Poly</strong></li> + <li><font face="Courier"><a href="../func/filled.html#cdBox"><b>Box</b></a></font>: + simulated using the client's <strong>Poly</strong>. </li> +</ul> +<h4>Attributes </h4> +<ul> + <li> + <a href="../func/lines.html#cdLineWidth"> + <font face="Courier"><strong>LineWidth</strong></font></a>: the driver will + use a polygon that fits to the line extents, even when linewidth==1.</li> + <li> + <a href="../func/lines.html#cdLineStyle"> + <font face="Courier"><strong>LineStyle</strong></font></a>: NOT supported.</li> + <li><a href="../func/filled.html#cdPattern"><font face="Courier"><strong> + Pattern</strong></font></a>: each pixel can contain transparency information.</li> + <li> + <a href="../func/text.html#cdNativeFont"> + <font face="Courier"><strong>NativeFont</strong></font></a>: also accepts the + X-Windows font string format. You can use program <strong>xfontsel</strong> to select a font and obtain the string. + For ex: "-*-times-bold-r-*-*-24-*-*-*-*-*-*-*" (equivalent of <strong>Font</strong>("Times", + CD_BOLD, -24).</li> + <li><a href="../func/text.html#cdFont"> + <font face="Courier"><strong>Font</strong></font></a>: font support is + implemented using the Xft library. Internally the Xft library uses the + Freetype library.</li> +</ul> +<h4>Colors </h4> +<ul> + <li> + Use the X-Windows base driver support for colors.</li> +</ul> +<h4>Client and Server Images</h4> +<ul> + <li> + All functions use the X-Windows base driver functions.</li> +</ul> +<h4>Exclusive Attributes</h4> +<ul> + <li>"<b><font face="Courier">GC</font></b>": returns the X11 graphics + context (get only). In Lua is returned as a user data.</li> +</ul> + +<ul> + <li>"<b><font face="Courier">ROTATE</font></b>": allows the usage of 1 + angle and 1 coordinate (x, y), that define a global rotation transformation + centered in the specified coordinate. Use 1 real and 2 integer values inside a + string ("%g %d %d" = angle x y). In this driver will change the + current transformation matrix, if removed will reset the current + transformation matrix.</li> +</ul> + +<ul> + <li>"<b><font face="Courier">ANTIALIAS</font></b>": controls the use of anti-aliasing + for the text, image zoom and line + drawing primitives. Assumes values "1" (active) and "0" (inactive). Default value: "1". </li> +</ul> + +<ul> + <li><b><font face="Courier">"LINEGRADIENT": </font></b>defines a filled interior style that uses a line gradient + between two colors. It uses 2 points ("%d %d %d %d" = x1 y1 x2 y2), one for the starting point using (using the + foreground color), and another one for the end point (using the background color). + (available only if Xrender version >= 0.10)</li> +</ul> + +<ul> + <li><b><font face="Courier">"XRENDERVERSION": </font></b>returns a + string with the XRender version number. It is empty if the XRender extension + is not available in the X-Windows server.</li> +</ul> + +</body> + +</html> diff --git a/html/en/drv/xwin.html b/html/en/drv/xwin.html new file mode 100644 index 0000000..cd2d900 --- /dev/null +++ b/html/en/drv/xwin.html @@ -0,0 +1,129 @@ +<!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>X-Windows</title> +<link rel="stylesheet" type="text/css" href="../../style.css"> +<style type="text/css"> +.style1 { + font-family: Courier; +} +</style> +</head> + +<body> + +<h2>X-Windows Base Driver</h2> + + <p>This driver represents a basic driver for all system-dependent drivers + implemented in the X-Windows system. The implementation uses the XLIB API + functions. It was developed using X11R4, but works in more recent versions, + such as X11R6.</p> + <p>Note: The coordinates internally implemented by the video driver use 16-bit + integers. Therefore, if a coordinate with less than -32k or more than 32k is + defined, it will be interpreted incorrectly.</p> + +<h3>Behavior of Functions</h3> +<h4>Control </h4> +<ul> + <li><a href="../func/other.html#cdPlay"> + <font face="Courier"><strong>Play</strong></font></a>: does nothing, returns + <font face="Courier">CD_ERROR</font>. </li> +</ul> +<h4>Coordinate System and Clipping </h4> +<ul> + <li> + <a href="../func/coordinates.html#cdUpdateYAxis"> + <font face="Courier"><strong>UpdateYAxis</strong></font></a>: the + orientation of axis Y is the opposite to its orientation in the CD library.</li> +</ul> +<h4>Primitives</h4> +<ul> + <li><a href="../func/text.html#cdText"><font face="Courier"><strong>Text</strong></font></a>: + text orientation is simulated using XVertex rotines. Generic transformation + matrix affects only the position of the text.</li> + <li><a href="../func/lines.html#cdBegin"> + <font face="Courier"><strong>Begin</strong></font></a>: Filled + polygons have an error of one pixel to the right and below. <strong><tt> + CD_BEZIER</tt></strong> is simulated with lines.</li> + <li><span class="style1"><a href="../func/marks.html#cdMark"> + <strong>Box</strong></a></span>: in Linux with ATI board, is being drawn with one + extra pixel to the right and below.</li> +</ul> +<h4>Attributes </h4> +<ul> + <li> + <a href="../func/lines.html#cdLineWidth"> + <font face="Courier"><strong>LineWidth</strong></font></a>: if + <font face="Courier">width</font> is 1, the driver will use 0 for a better + performance.</li> + <li> + <a href="../func/lines.html#cdLineStyle"> + <font face="Courier"><strong>LineStyle</strong></font></a>: thick lines have + style only in the line's direction. For example, you will see small rectangles + in a thick dotted line.</li> + <li> + <a href="../func/text.html#cdNativeFont"> + <font face="Courier"><strong>NativeFont</strong></font></a>: also accepts the + X-Windows font string format. You can use program <strong>xfontsel</strong> to select a font and obtain the string. + For ex: "-*-times-bold-r-*-*-24-*-*-*-*-*-*-*" (equivalent of <strong>Font</strong>("Times", + CD_BOLD, -24).</li> + <li><a href="../func/text.html#cdFont"> + <font face="Courier"><strong>Font</strong></font></a>: the old name "System" + is mapped to "fixed".</li> +</ul> +<h4>Colors </h4> +<ul> + <li> + <a href="../func/color.html#cdPalette"> + <font face="Courier"><strong>Palette</strong></font></a>: When the number of + bits per pixel is smaller than or equal to 8, the driver will use the system + palette to solve colors passed as parameters to the canvas. The driver + allocates colors as they are requested - if a color cannot be allocated, the + closest color is used in the palette. For such, the driver sees all available + colors, in the current application and others. If one of the applications is + terminated, a color in the palette may become invalid and will only be updated + by the driver when it is requested again. For this reason, a call to <strong> + cdForeground </strong>or <strong>cdBackground</strong> or <strong>cdPalette</strong> + is recommended before drawing.<br> + When CD_FORCE is used, the driver forces color allocation in the X server. + This may imply changing colors in other applications when a cursor moves in + and out of the canvas. However, if the number of requested colors is smaller + than the maximum number of possible colors in the palette, then the first + colors in the default system palette will be preserved, minimizing this + problem.<br> + When CD_POLITE is used, all colors allocated by the driver are liberated, and + the requested colors are allocated. This is useful for the application to + prioritize the colors that will be allocated, causing other colors to be + mapped to their closest colors.<br> + Note that canvases in the same application interfere with one another, but + when a canvas is terminated it liberates all allocated colors.</li> +</ul> +<h4>Client Images</h4> +<ul> + <li> + <a href="../func/client.html#cdGetImageRGB"> + <font face="Courier"><strong>GetImageRGB</strong></font></a>: can be very + slow due to the heavy conversions performed to translate data in system format + into RGB vectors. </li> +</ul> +<h4>Exclusive Attributes</h4> +<ul> + <li>"<b><font face="Courier">GC</font></b>": returns the X11 graphics + context (get only). In Lua is returned as a user data.</li> +</ul> + +<ul> + <li>"<b><font face="Courier">ROTATE</font></b>": allows the usage of 1 + angle and 1 coordinate (x, y), that define a global rotation transformation + centered in the specified coordinate. Use 1 real and 2 integer values inside a + string ("%g %d %d" = angle x y). In this driver will change the + current transformation matrix, if removed will reset the current + transformation matrix.</li> +</ul> + +</body> + +</html> |