Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > aaf33964de706a538481c929c1da6a44 > files > 23

faust-doc-0.9.10-5mdv2010.1.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>FAUST compiler: SVGDev.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>SVGDev.cpp</h1><a href="SVGDev_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/************************************************************************</span>
<a name="l00002"></a>00002 <span class="comment"> ************************************************************************</span>
<a name="l00003"></a>00003 <span class="comment">    FAUST compiler</span>
<a name="l00004"></a>00004 <span class="comment">    Copyright (C) 2003-2004 GRAME, Centre National de Creation Musicale</span>
<a name="l00005"></a>00005 <span class="comment">    ---------------------------------------------------------------------</span>
<a name="l00006"></a>00006 <span class="comment">    This program is free software; you can redistribute it and/or modify</span>
<a name="l00007"></a>00007 <span class="comment">    it under the terms of the GNU General Public License as published by</span>
<a name="l00008"></a>00008 <span class="comment">    the Free Software Foundation; either version 2 of the License, or</span>
<a name="l00009"></a>00009 <span class="comment">    (at your option) any later version.</span>
<a name="l00010"></a>00010 <span class="comment"></span>
<a name="l00011"></a>00011 <span class="comment">    This program is distributed in the hope that it will be useful,</span>
<a name="l00012"></a>00012 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00013"></a>00013 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00014"></a>00014 <span class="comment">    GNU General Public License for more details.</span>
<a name="l00015"></a>00015 <span class="comment"></span>
<a name="l00016"></a>00016 <span class="comment">    You should have received a copy of the GNU General Public License</span>
<a name="l00017"></a>00017 <span class="comment">    along with this program; if not, write to the Free Software</span>
<a name="l00018"></a>00018 <span class="comment">    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span>
<a name="l00019"></a>00019 <span class="comment"> ************************************************************************</span>
<a name="l00020"></a>00020 <span class="comment"> ************************************************************************/</span>
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 
<a name="l00024"></a>00024 <span class="comment">// SVGDev.cpp</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;<a class="code" href="SVGDev_8h.html">SVGDev.h</a>&quot;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &quot;stdio.h&quot;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00029"></a>00029 <span class="keyword">using namespace </span>std;
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="keyword">extern</span> <span class="keywordtype">bool</span> <a class="code" href="SVGDev_8cpp.html#a595b1bcec2a76e15debe16ac5ab703d4">gShadowBlur</a>;
<a name="l00032"></a>00032 
<a name="l00033"></a><a class="code" href="SVGDev_8cpp.html#acc3c10bd3c0bd5e785a2a546659d7228">00033</a> <span class="keyword">static</span> <span class="keywordtype">char</span>* <a class="code" href="SVGDev_8cpp.html#acc3c10bd3c0bd5e785a2a546659d7228">xmlcode</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a>, <span class="keywordtype">char</span>* name2)
<a name="l00034"></a>00034 {
<a name="l00035"></a>00035     <span class="keywordtype">int</span> i,j;
<a name="l00036"></a>00036 
<a name="l00037"></a>00037     <span class="comment">// SUBSTITUTION DES CARACTeRES INTERDITS EN XML</span>
<a name="l00038"></a>00038 
<a name="l00039"></a>00039     <span class="keywordflow">for</span> (i=0, j=0; (name[i] != 0) &amp;&amp; (j &lt; 250); i++) {
<a name="l00040"></a>00040         <span class="keywordflow">switch</span> (name[i]) {
<a name="l00041"></a>00041             <span class="keywordflow">case</span> <span class="charliteral">&#39;&lt;&#39;</span>    : name2[j++] = <span class="charliteral">&#39;&amp;&#39;</span>; name2[j++] = <span class="charliteral">&#39;l&#39;</span>; name2[j++] = <span class="charliteral">&#39;t&#39;</span>; name2[j++] = <span class="charliteral">&#39;;&#39;</span>;   <span class="keywordflow">break</span>;
<a name="l00042"></a>00042             <span class="keywordflow">case</span> <span class="charliteral">&#39;&gt;&#39;</span>    : name2[j++] = <span class="charliteral">&#39;&amp;&#39;</span>; name2[j++] = <span class="charliteral">&#39;g&#39;</span>; name2[j++] = <span class="charliteral">&#39;t&#39;</span>; name2[j++] = <span class="charliteral">&#39;;&#39;</span>;   <span class="keywordflow">break</span>;
<a name="l00043"></a>00043             <span class="keywordflow">case</span> <span class="charliteral">&#39;\&#39;&#39;</span>   : name2[j++] = <span class="charliteral">&#39;&amp;&#39;</span>; name2[j++] = <span class="charliteral">&#39;a&#39;</span>; name2[j++] = <span class="charliteral">&#39;p&#39;</span>; name2[j++] = <span class="charliteral">&#39;o&#39;</span>; name2[j++] = <span class="charliteral">&#39;s&#39;</span>; name2[j++] = <span class="charliteral">&#39;;&#39;</span>;   <span class="keywordflow">break</span>;
<a name="l00044"></a>00044             <span class="keywordflow">case</span> <span class="charliteral">&#39;&quot;&#39;</span>    : name2[j++] = <span class="charliteral">&#39;&amp;&#39;</span>; name2[j++] = <span class="charliteral">&#39;q&#39;</span>; name2[j++] = <span class="charliteral">&#39;u&#39;</span>; name2[j++] = <span class="charliteral">&#39;o&#39;</span>; name2[j++] = <span class="charliteral">&#39;t&#39;</span>; name2[j++] = <span class="charliteral">&#39;;&#39;</span>;   <span class="keywordflow">break</span>;
<a name="l00045"></a>00045             <span class="keywordflow">case</span> <span class="charliteral">&#39;&amp;&#39;</span>    : name2[j++] = <span class="charliteral">&#39;&amp;&#39;</span>; name2[j++] = <span class="charliteral">&#39;a&#39;</span>; name2[j++] = <span class="charliteral">&#39;m&#39;</span>; name2[j++] = <span class="charliteral">&#39;p&#39;</span>; name2[j++] = <span class="charliteral">&#39;;&#39;</span>;     <span class="keywordflow">break</span>;
<a name="l00046"></a>00046             <span class="keywordflow">default</span>     : name2[j++] = name[i];
<a name="l00047"></a>00047         }
<a name="l00048"></a>00048     }
<a name="l00049"></a>00049     name2[j] = 0;
<a name="l00050"></a>00050 
<a name="l00051"></a>00051     <span class="keywordflow">return</span> name2;
<a name="l00052"></a>00052 }
<a name="l00053"></a>00053 
<a name="l00054"></a><a class="code" href="classSVGDev.html#a4f8d8c8c7f2806408d1daaf85ac085b0">00054</a> <a class="code" href="classSVGDev.html#a4f8d8c8c7f2806408d1daaf85ac085b0">SVGDev::SVGDev</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* ficName,<span class="keywordtype">double</span> largeur, <span class="keywordtype">double</span> hauteur)
<a name="l00055"></a>00055 {
<a name="l00056"></a>00056     <span class="keywordtype">double</span> gScale = 0.5;
<a name="l00057"></a>00057 <span class="comment">//  if ((fic_repr = fopen(addFileNum(ficName),&quot;w+&quot;)) == NULL) {</span>
<a name="l00058"></a>00058     <span class="keywordflow">if</span> ((<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a> = fopen(ficName,<span class="stringliteral">&quot;w+&quot;</span>)) == NULL) {
<a name="l00059"></a>00059     <span class="comment">//if((fic_repr = fopen(ficName,&quot;w+&quot;)) == NULL) {</span>
<a name="l00060"></a>00060         cout&lt;&lt;<span class="stringliteral">&quot;Impossible de creer ou d&#39;ouvrir &quot;</span>&lt;&lt;ficName&lt;&lt;endl;
<a name="l00061"></a>00061     }
<a name="l00062"></a>00062 
<a name="l00063"></a>00063     <span class="comment">// representation file:</span>
<a name="l00064"></a>00064     fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;?xml version=\&quot;1.0\&quot;?&gt;\n&quot;</span>);
<a name="l00065"></a>00065     <span class="comment">// + DTD ...</span>
<a name="l00066"></a>00066     <span class="comment">// viewBox:</span>
<a name="l00067"></a>00067     <span class="comment">//fprintf(fic_repr,&quot;&lt;svg xmlns=\&quot;http://www.w3.org/2000/svg\&quot; xmlns:xlink=\&quot;http://www.w3.org/1999/xlink\&quot; preserveAspectRatio=\&quot;xMidYMid meet\&quot; viewBox=\&quot;0 0 %f %f\&quot; width=\&quot;200mm\&quot; height=\&quot;150mm\&quot; &gt;\n&quot;,largeur,hauteur);</span>
<a name="l00068"></a>00068     fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;svg xmlns=\&quot;http://www.w3.org/2000/svg\&quot; xmlns:xlink=\&quot;http://www.w3.org/1999/xlink\&quot; viewBox=\&quot;0 0 %f %f\&quot; width=\&quot;%fmm\&quot; height=\&quot;%fmm\&quot; version=\&quot;1.1\&quot;&gt;\n&quot;</span>, largeur, hauteur, largeur*gScale, hauteur*gScale);
<a name="l00069"></a>00069 
<a name="l00070"></a>00070     <span class="keywordflow">if</span> (<a class="code" href="SVGDev_8cpp.html#a595b1bcec2a76e15debe16ac5ab703d4">gShadowBlur</a>) {
<a name="l00071"></a>00071      fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,
<a name="l00072"></a>00072         <span class="stringliteral">&quot;&lt;defs&gt;\n&quot;</span>
<a name="l00073"></a>00073         <span class="stringliteral">&quot;   &lt;filter id=\&quot;filter\&quot; filterRes=\&quot;50\&quot; x=\&quot;0\&quot; y=\&quot;0\&quot;&gt;\n&quot;</span>
<a name="l00074"></a>00074         <span class="stringliteral">&quot;     &lt;feGaussianBlur in=\&quot;SourceGraphic\&quot; stdDeviation=\&quot;1.5\&quot;/&gt;\n&quot;</span>
<a name="l00075"></a>00075         <span class="stringliteral">&quot;     &lt;feOffset dx=\&quot;1\&quot; dy=\&quot;1\&quot;/&gt;\n&quot;</span>
<a name="l00076"></a>00076         <span class="stringliteral">&quot;   &lt;/filter&gt;\n&quot;</span>
<a name="l00077"></a>00077         <span class="stringliteral">&quot;&lt;/defs&gt;\n&quot;</span>
<a name="l00078"></a>00078         );
<a name="l00079"></a>00079     }
<a name="l00080"></a>00080 
<a name="l00081"></a>00081 }
<a name="l00082"></a>00082 
<a name="l00083"></a><a class="code" href="classSVGDev.html#aa7f2713024b9b913e61a656e908bc13e">00083</a> <a class="code" href="classSVGDev.html#aa7f2713024b9b913e61a656e908bc13e">SVGDev::~SVGDev</a>()
<a name="l00084"></a>00084 {
<a name="l00085"></a>00085     fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;/svg&gt;\n&quot;</span>);
<a name="l00086"></a>00086     fclose(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>);
<a name="l00087"></a>00087 }
<a name="l00088"></a>00088 
<a name="l00089"></a><a class="code" href="classSVGDev.html#af958b7e7813cdb4eeea105956153e639">00089</a> <span class="keywordtype">void</span> <a class="code" href="classSVGDev.html#af958b7e7813cdb4eeea105956153e639">SVGDev::rect</a>(<span class="keywordtype">double</span> x,<span class="keywordtype">double</span> y,<span class="keywordtype">double</span> l,<span class="keywordtype">double</span> h, <span class="keyword">const</span> <span class="keywordtype">char</span>* color, <span class="keyword">const</span> <span class="keywordtype">char</span>* link)
<a name="l00090"></a>00090 {
<a name="l00091"></a>00091     <span class="keywordtype">char</span> buf[512];
<a name="l00092"></a>00092     <span class="keywordflow">if</span> (link != 0 &amp;&amp; link[0]!=0) {
<a name="l00093"></a>00093         <span class="comment">// open the optional link tag</span>
<a name="l00094"></a>00094         fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;a xlink:href=\&quot;%s\&quot;&gt;\n&quot;</span>, <a class="code" href="SVGDev_8cpp.html#acc3c10bd3c0bd5e785a2a546659d7228">xmlcode</a>(link, buf));
<a name="l00095"></a>00095     }
<a name="l00096"></a>00096     <span class="comment">// draw the shadow</span>
<a name="l00097"></a>00097     <span class="keywordflow">if</span> (<a class="code" href="SVGDev_8cpp.html#a595b1bcec2a76e15debe16ac5ab703d4">gShadowBlur</a>) {
<a name="l00098"></a>00098         fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;rect x=\&quot;%f\&quot; y=\&quot;%f\&quot; width=\&quot;%f\&quot; height=\&quot;%f\&quot; rx=\&quot;0\&quot; ry=\&quot;0\&quot; style=\&quot;stroke:none;fill:#888888;;filter:url(#filter);\&quot;/&gt;\n&quot;</span>,x+1,y+1,l,h);
<a name="l00099"></a>00099     } <span class="keywordflow">else</span> {
<a name="l00100"></a>00100         fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;rect x=\&quot;%f\&quot; y=\&quot;%f\&quot; width=\&quot;%f\&quot; height=\&quot;%f\&quot; rx=\&quot;0\&quot; ry=\&quot;0\&quot; style=\&quot;stroke:none;fill:#cccccc;\&quot;/&gt;\n&quot;</span>,x+1,y+1,l,h);
<a name="l00101"></a>00101     }
<a name="l00102"></a>00102 
<a name="l00103"></a>00103     <span class="comment">// draw the rectangle</span>
<a name="l00104"></a>00104     <span class="comment">//fprintf(fic_repr,&quot;&lt;rect x=\&quot;%f\&quot; y=\&quot;%f\&quot; width=\&quot;%f\&quot; height=\&quot;%f\&quot; rx=\&quot;0\&quot; ry=\&quot;0\&quot; style=\&quot;shape-rendering: crispEdges; stroke: black;stroke-width:0.25;fill:%s;\&quot;/&gt;\n&quot;, x, y, l, h, color);</span>
<a name="l00105"></a>00105     <span class="comment">//fprintf(fic_repr,&quot;&lt;rect x=\&quot;%f\&quot; y=\&quot;%f\&quot; width=\&quot;%f\&quot; height=\&quot;%f\&quot; rx=\&quot;0\&quot; ry=\&quot;0\&quot; style=\&quot;stroke: black;stroke-width:0.25;fill:%s;\&quot;/&gt;\n&quot;, x, y, l, h, color);</span>
<a name="l00106"></a>00106     fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;rect x=\&quot;%f\&quot; y=\&quot;%f\&quot; width=\&quot;%f\&quot; height=\&quot;%f\&quot; rx=\&quot;0\&quot; ry=\&quot;0\&quot; style=\&quot;stroke:none;fill:%s;\&quot;/&gt;\n&quot;</span>, x, y, l, h, color);
<a name="l00107"></a>00107     <span class="keywordflow">if</span> (link != 0 &amp;&amp; link[0]!=0) {
<a name="l00108"></a>00108         <span class="comment">// close the optional link tag</span>
<a name="l00109"></a>00109         fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;/a&gt;\n&quot;</span>);
<a name="l00110"></a>00110     }
<a name="l00111"></a>00111 
<a name="l00112"></a>00112 }
<a name="l00113"></a>00113 
<a name="l00114"></a><a class="code" href="classSVGDev.html#a3dd8a47f184dd41502be3c3162f5370f">00114</a> <span class="keywordtype">void</span> <a class="code" href="classSVGDev.html#a3dd8a47f184dd41502be3c3162f5370f">SVGDev::rond</a>(<span class="keywordtype">double</span> x,<span class="keywordtype">double</span> y,<span class="keywordtype">double</span> rayon)
<a name="l00115"></a>00115 {
<a name="l00116"></a>00116     fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;circle cx=\&quot;%f\&quot; cy=\&quot;%f\&quot; r=\&quot;%f\&quot;/&gt;\n&quot;</span>,x,y,rayon);
<a name="l00117"></a>00117 }
<a name="l00118"></a>00118 
<a name="l00119"></a><a class="code" href="classSVGDev.html#a494f0145ed98c57ca0d8f3494bb892e4">00119</a> <span class="keywordtype">void</span> <a class="code" href="classSVGDev.html#a494f0145ed98c57ca0d8f3494bb892e4">SVGDev::fleche</a>(<span class="keywordtype">double</span> x,<span class="keywordtype">double</span> y,<span class="keywordtype">double</span> rotation,<span class="keywordtype">int</span> sens)
<a name="l00120"></a>00120 {
<a name="l00121"></a>00121     <span class="keywordtype">double</span> dx = 3;
<a name="l00122"></a>00122     <span class="keywordtype">double</span> dy = 1;
<a name="l00123"></a>00123 
<a name="l00124"></a>00124     <span class="keywordflow">if</span>(sens == 1)
<a name="l00125"></a>00125     {
<a name="l00126"></a>00126         fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;line x1=\&quot;%f\&quot; y1=\&quot;%f\&quot; x2=\&quot;%f\&quot; y2=\&quot;%f\&quot;  transform=\&quot;rotate(%f,%f,%f)\&quot; style=\&quot;stroke: black; stroke-width:0.25;\&quot;/&gt;\n&quot;</span>,x-dx,y-dy,x,y,rotation,x,y);
<a name="l00127"></a>00127         fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;line x1=\&quot;%f\&quot; y1=\&quot;%f\&quot; x2=\&quot;%f\&quot; y2=\&quot;%f\&quot;  transform=\&quot;rotate(%f,%f,%f)\&quot; style=\&quot;stroke: black; stroke-width:0.25;\&quot;/&gt;\n&quot;</span>,x-dx,y+dy,x,y,rotation,x,y);
<a name="l00128"></a>00128     }
<a name="l00129"></a>00129     <span class="keywordflow">else</span> <span class="comment">//for recursion</span>
<a name="l00130"></a>00130     {
<a name="l00131"></a>00131         fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;line x1=\&quot;%f\&quot; y1=\&quot;%f\&quot; x2=\&quot;%f\&quot; y2=\&quot;%f\&quot;  transform=\&quot;rotate(%f,%f,%f)\&quot; style=\&quot;stroke: black; stroke-width:0.25;\&quot;/&gt;\n&quot;</span>,x+dx,y-dy,x,y,rotation,x,y);
<a name="l00132"></a>00132         fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;line x1=\&quot;%f\&quot; y1=\&quot;%f\&quot; x2=\&quot;%f\&quot; y2=\&quot;%f\&quot;  transform=\&quot;rotate(%f,%f,%f)\&quot; style=\&quot;stroke: black; stroke-width:0.25;\&quot;/&gt;\n&quot;</span>,x+dx,y+dy,x,y,rotation,x,y);
<a name="l00133"></a>00133     }
<a name="l00134"></a>00134 }
<a name="l00135"></a>00135 
<a name="l00136"></a><a class="code" href="classSVGDev.html#a2a043f0b9db3d14add6f562d8ec94443">00136</a> <span class="keywordtype">void</span> <a class="code" href="classSVGDev.html#a2a043f0b9db3d14add6f562d8ec94443">SVGDev::carre</a>(<span class="keywordtype">double</span> x,<span class="keywordtype">double</span> y,<span class="keywordtype">double</span> cote)
<a name="l00137"></a>00137 {
<a name="l00138"></a>00138     fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;rect x=\&quot;%f\&quot; y=\&quot;%f\&quot; width=\&quot;%f\&quot; height=\&quot;%f\&quot; style=\&quot;stroke: black;stroke-width:0.5;fill:none;\&quot;/&gt;\n&quot;</span>,x-0.5*cote,y-cote,cote,cote);
<a name="l00139"></a>00139 }
<a name="l00140"></a>00140 
<a name="l00141"></a><a class="code" href="classSVGDev.html#a9eb8bb7840b44f51c4dad62280d8788d">00141</a> <span class="keywordtype">void</span> <a class="code" href="classSVGDev.html#a9eb8bb7840b44f51c4dad62280d8788d">SVGDev::trait</a>(<span class="keywordtype">double</span> x1,<span class="keywordtype">double</span> y1,<span class="keywordtype">double</span> x2,<span class="keywordtype">double</span> y2)
<a name="l00142"></a>00142 {
<a name="l00143"></a>00143     <span class="comment">//fprintf(fic_repr,&quot;&lt;line x1=\&quot;%f\&quot; y1=\&quot;%f\&quot; x2=\&quot;%f\&quot; y2=\&quot;%f\&quot;  style=\&quot;shape-rendering: crispEdges; stroke:black; stroke-linecap:round; stroke-width:0.25;\&quot;/&gt;\n&quot;,x1,y1,x2,y2);</span>
<a name="l00144"></a>00144     fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;line x1=\&quot;%f\&quot; y1=\&quot;%f\&quot; x2=\&quot;%f\&quot; y2=\&quot;%f\&quot;  style=\&quot;stroke:black; stroke-linecap:round; stroke-width:0.25;\&quot;/&gt;\n&quot;</span>,x1,y1,x2,y2);
<a name="l00145"></a>00145 }
<a name="l00146"></a>00146 
<a name="l00147"></a><a class="code" href="classSVGDev.html#abd04f96090467600dad6b7539f6e25c2">00147</a> <span class="keywordtype">void</span> <a class="code" href="classSVGDev.html#abd04f96090467600dad6b7539f6e25c2">SVGDev::dasharray</a>(<span class="keywordtype">double</span> x1,<span class="keywordtype">double</span> y1,<span class="keywordtype">double</span> x2,<span class="keywordtype">double</span> y2)
<a name="l00148"></a>00148 {
<a name="l00149"></a>00149     fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;line x1=\&quot;%f\&quot; y1=\&quot;%f\&quot; x2=\&quot;%f\&quot; y2=\&quot;%f\&quot;  style=\&quot;stroke: black; stroke-linecap:round; stroke-width:0.25; stroke-dasharray:3,3;\&quot;/&gt;\n&quot;</span>,x1,y1,x2,y2);
<a name="l00150"></a>00150 }
<a name="l00151"></a>00151 
<a name="l00152"></a><a class="code" href="classSVGDev.html#a286722261b3144a1c7b6172efd46faaa">00152</a> <span class="keywordtype">void</span> <a class="code" href="classSVGDev.html#a286722261b3144a1c7b6172efd46faaa">SVGDev::text</a>(<span class="keywordtype">double</span> x,<span class="keywordtype">double</span> y,<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a>)
<a name="l00153"></a>00153 {
<a name="l00154"></a>00154     <span class="keywordtype">char</span> name2[256];
<a name="l00155"></a>00155     <span class="comment">//fprintf(fic_repr,&quot;&lt;text x=\&quot;%f\&quot; y=\&quot;%f\&quot; font-family=\&quot;Courier\&quot; font-size=\&quot;8\&quot; text-anchor=\&quot;middle\&quot;&gt;%s&lt;/text&gt;\n&quot;,x,y+3,xmlcode(name,name2));</span>
<a name="l00156"></a>00156     fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;text x=\&quot;%f\&quot; y=\&quot;%f\&quot; font-family=\&quot;Arial\&quot; font-size=\&quot;7\&quot; text-anchor=\&quot;middle\&quot; fill=\&quot;#FFFFFF\&quot;&gt;%s&lt;/text&gt;\n&quot;</span>,x,y+2,<a class="code" href="SVGDev_8cpp.html#acc3c10bd3c0bd5e785a2a546659d7228">xmlcode</a>(name,name2));
<a name="l00157"></a>00157 }
<a name="l00158"></a>00158 
<a name="l00159"></a><a class="code" href="classSVGDev.html#ad5b0c2ea97bb28505afb0a9cb7ac7218">00159</a> <span class="keywordtype">void</span> <a class="code" href="classSVGDev.html#ad5b0c2ea97bb28505afb0a9cb7ac7218">SVGDev::label</a>(<span class="keywordtype">double</span> x,<span class="keywordtype">double</span> y,<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a>)
<a name="l00160"></a>00160 {
<a name="l00161"></a>00161     <span class="keywordtype">char</span> name2[256];
<a name="l00162"></a>00162 <span class="comment">//  fprintf(fic_repr,&quot;&lt;text x=\&quot;%f\&quot; y=\&quot;%f\&quot; style=\&quot;font-family:Courier;font-weight:normal;font-style:normal;font-size:7\&quot;&gt;%s&lt;/text&gt;\n&quot;,x,y+2,xmlcode(name,name2));</span>
<a name="l00163"></a>00163     fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;text x=\&quot;%f\&quot; y=\&quot;%f\&quot; font-family=\&quot;Arial\&quot; font-size=\&quot;7\&quot;&gt;%s&lt;/text&gt;\n&quot;</span>,x,y+2,<a class="code" href="SVGDev_8cpp.html#acc3c10bd3c0bd5e785a2a546659d7228">xmlcode</a>(name,name2));
<a name="l00164"></a>00164 <span class="comment">//  fprintf(fic_repr,&quot;&lt;text x=\&quot;%f\&quot; y=\&quot;%f\&quot; font-family=\&quot;Courier\&quot; font-size=\&quot;7\&quot; fill=\&quot;#000000\&quot;&gt;%s&lt;/text&gt;\n&quot;,x,y+2,xmlcode(name,name2));</span>
<a name="l00165"></a>00165 }
<a name="l00166"></a>00166 
<a name="l00167"></a><a class="code" href="classSVGDev.html#aed3484be36565e53a013a1fb024e700f">00167</a> <span class="keywordtype">void</span> <a class="code" href="classSVGDev.html#aed3484be36565e53a013a1fb024e700f">SVGDev::markSens</a>(<span class="keywordtype">double</span> x,<span class="keywordtype">double</span> y,<span class="keywordtype">int</span> sens)
<a name="l00168"></a>00168 {
<a name="l00169"></a>00169     <span class="keywordtype">int</span> offset = (sens == 1) ? 2 : -2;
<a name="l00170"></a>00170     fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;circle cx=\&quot;%f\&quot; cy=\&quot;%f\&quot; r=\&quot;1\&quot;/&gt;\n&quot;</span>, x+offset, y+offset);
<a name="l00171"></a>00171 }
<a name="l00172"></a>00172 
<a name="l00173"></a><a class="code" href="classSVGDev.html#a7be32445b644958d785388620bf81b61">00173</a> <span class="keywordtype">void</span> <a class="code" href="classSVGDev.html#a7be32445b644958d785388620bf81b61">SVGDev::Error</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* message, <span class="keyword">const</span> <span class="keywordtype">char</span>* reason,<span class="keywordtype">int</span> nb_error,<span class="keywordtype">double</span> x,<span class="keywordtype">double</span> y,<span class="keywordtype">double</span> largeur)
<a name="l00174"></a>00174 {
<a name="l00175"></a>00175     fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;text x=\&quot;%f\&quot; y=\&quot;%f\&quot;  textLength=\&quot;%f\&quot; lengthAdjust=\&quot;spacingAndGlyphs\&quot; style=\&quot;stroke: red; stroke-width:0.3; fill:red; text-anchor:middle;\&quot;&gt;%d : %s&lt;/text&gt;\n&quot;</span>,x,y-7,largeur,nb_error,message);
<a name="l00176"></a>00176     fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">&quot;&lt;text x=\&quot;%f\&quot; y=\&quot;%f\&quot;  textLength=\&quot;%f\&quot; lengthAdjust=\&quot;spacingAndGlyphs\&quot; style=\&quot;stroke: red; stroke-width:0.3; fill:none; text-anchor:middle;\&quot;&gt;%s&lt;/text&gt;\n&quot;</span>,x,y+7,largeur,reason);
<a name="l00177"></a>00177 }
<a name="l00178"></a>00178 
<a name="l00179"></a>00179 
<a name="l00180"></a>00180 
</pre></div></div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Wed Apr 28 23:59:59 2010 for FAUST compiler by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>