diff options
Diffstat (limited to 'html/en/drv/sim.html')
-rw-r--r-- | html/en/drv/sim.html | 90 |
1 files changed, 90 insertions, 0 deletions
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> |