<!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 Page</span></a></li> <li><a href="pages.html"><span>Related 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 List</span></a></li> <li><a href="globals.html"><span>File 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 "<a class="code" href="SVGDev_8h.html">SVGDev.h</a>"</span> <a name="l00027"></a>00027 <span class="preprocessor">#include "stdio.h"</span> <a name="l00028"></a>00028 <span class="preprocessor">#include <iostream></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) && (j < 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">'<'</span> : name2[j++] = <span class="charliteral">'&'</span>; name2[j++] = <span class="charliteral">'l'</span>; name2[j++] = <span class="charliteral">'t'</span>; name2[j++] = <span class="charliteral">';'</span>; <span class="keywordflow">break</span>; <a name="l00042"></a>00042 <span class="keywordflow">case</span> <span class="charliteral">'>'</span> : name2[j++] = <span class="charliteral">'&'</span>; name2[j++] = <span class="charliteral">'g'</span>; name2[j++] = <span class="charliteral">'t'</span>; name2[j++] = <span class="charliteral">';'</span>; <span class="keywordflow">break</span>; <a name="l00043"></a>00043 <span class="keywordflow">case</span> <span class="charliteral">'\''</span> : name2[j++] = <span class="charliteral">'&'</span>; name2[j++] = <span class="charliteral">'a'</span>; name2[j++] = <span class="charliteral">'p'</span>; name2[j++] = <span class="charliteral">'o'</span>; name2[j++] = <span class="charliteral">'s'</span>; name2[j++] = <span class="charliteral">';'</span>; <span class="keywordflow">break</span>; <a name="l00044"></a>00044 <span class="keywordflow">case</span> <span class="charliteral">'"'</span> : name2[j++] = <span class="charliteral">'&'</span>; name2[j++] = <span class="charliteral">'q'</span>; name2[j++] = <span class="charliteral">'u'</span>; name2[j++] = <span class="charliteral">'o'</span>; name2[j++] = <span class="charliteral">'t'</span>; name2[j++] = <span class="charliteral">';'</span>; <span class="keywordflow">break</span>; <a name="l00045"></a>00045 <span class="keywordflow">case</span> <span class="charliteral">'&'</span> : name2[j++] = <span class="charliteral">'&'</span>; name2[j++] = <span class="charliteral">'a'</span>; name2[j++] = <span class="charliteral">'m'</span>; name2[j++] = <span class="charliteral">'p'</span>; name2[j++] = <span class="charliteral">';'</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),"w+")) == 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">"w+"</span>)) == NULL) { <a name="l00059"></a>00059 <span class="comment">//if((fic_repr = fopen(ficName,"w+")) == NULL) {</span> <a name="l00060"></a>00060 cout<<<span class="stringliteral">"Impossible de creer ou d'ouvrir "</span><<ficName<<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">"<?xml version=\"1.0\"?>\n"</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,"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 %f %f\" width=\"200mm\" height=\"150mm\" >\n",largeur,hauteur);</span> <a name="l00068"></a>00068 fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 %f %f\" width=\"%fmm\" height=\"%fmm\" version=\"1.1\">\n"</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">"<defs>\n"</span> <a name="l00073"></a>00073 <span class="stringliteral">" <filter id=\"filter\" filterRes=\"50\" x=\"0\" y=\"0\">\n"</span> <a name="l00074"></a>00074 <span class="stringliteral">" <feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"1.5\"/>\n"</span> <a name="l00075"></a>00075 <span class="stringliteral">" <feOffset dx=\"1\" dy=\"1\"/>\n"</span> <a name="l00076"></a>00076 <span class="stringliteral">" </filter>\n"</span> <a name="l00077"></a>00077 <span class="stringliteral">"</defs>\n"</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">"</svg>\n"</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 && 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">"<a xlink:href=\"%s\">\n"</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">"<rect x=\"%f\" y=\"%f\" width=\"%f\" height=\"%f\" rx=\"0\" ry=\"0\" style=\"stroke:none;fill:#888888;;filter:url(#filter);\"/>\n"</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">"<rect x=\"%f\" y=\"%f\" width=\"%f\" height=\"%f\" rx=\"0\" ry=\"0\" style=\"stroke:none;fill:#cccccc;\"/>\n"</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,"<rect x=\"%f\" y=\"%f\" width=\"%f\" height=\"%f\" rx=\"0\" ry=\"0\" style=\"shape-rendering: crispEdges; stroke: black;stroke-width:0.25;fill:%s;\"/>\n", x, y, l, h, color);</span> <a name="l00105"></a>00105 <span class="comment">//fprintf(fic_repr,"<rect x=\"%f\" y=\"%f\" width=\"%f\" height=\"%f\" rx=\"0\" ry=\"0\" style=\"stroke: black;stroke-width:0.25;fill:%s;\"/>\n", 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">"<rect x=\"%f\" y=\"%f\" width=\"%f\" height=\"%f\" rx=\"0\" ry=\"0\" style=\"stroke:none;fill:%s;\"/>\n"</span>, x, y, l, h, color); <a name="l00107"></a>00107 <span class="keywordflow">if</span> (link != 0 && 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">"</a>\n"</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">"<circle cx=\"%f\" cy=\"%f\" r=\"%f\"/>\n"</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">"<line x1=\"%f\" y1=\"%f\" x2=\"%f\" y2=\"%f\" transform=\"rotate(%f,%f,%f)\" style=\"stroke: black; stroke-width:0.25;\"/>\n"</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">"<line x1=\"%f\" y1=\"%f\" x2=\"%f\" y2=\"%f\" transform=\"rotate(%f,%f,%f)\" style=\"stroke: black; stroke-width:0.25;\"/>\n"</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">"<line x1=\"%f\" y1=\"%f\" x2=\"%f\" y2=\"%f\" transform=\"rotate(%f,%f,%f)\" style=\"stroke: black; stroke-width:0.25;\"/>\n"</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">"<line x1=\"%f\" y1=\"%f\" x2=\"%f\" y2=\"%f\" transform=\"rotate(%f,%f,%f)\" style=\"stroke: black; stroke-width:0.25;\"/>\n"</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">"<rect x=\"%f\" y=\"%f\" width=\"%f\" height=\"%f\" style=\"stroke: black;stroke-width:0.5;fill:none;\"/>\n"</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,"<line x1=\"%f\" y1=\"%f\" x2=\"%f\" y2=\"%f\" style=\"shape-rendering: crispEdges; stroke:black; stroke-linecap:round; stroke-width:0.25;\"/>\n",x1,y1,x2,y2);</span> <a name="l00144"></a>00144 fprintf(<a class="code" href="classdevice.html#a0dd0aac8a55f20630492e8ae1dd3259d">fic_repr</a>,<span class="stringliteral">"<line x1=\"%f\" y1=\"%f\" x2=\"%f\" y2=\"%f\" style=\"stroke:black; stroke-linecap:round; stroke-width:0.25;\"/>\n"</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">"<line x1=\"%f\" y1=\"%f\" x2=\"%f\" y2=\"%f\" style=\"stroke: black; stroke-linecap:round; stroke-width:0.25; stroke-dasharray:3,3;\"/>\n"</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,"<text x=\"%f\" y=\"%f\" font-family=\"Courier\" font-size=\"8\" text-anchor=\"middle\">%s</text>\n",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">"<text x=\"%f\" y=\"%f\" font-family=\"Arial\" font-size=\"7\" text-anchor=\"middle\" fill=\"#FFFFFF\">%s</text>\n"</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,"<text x=\"%f\" y=\"%f\" style=\"font-family:Courier;font-weight:normal;font-style:normal;font-size:7\">%s</text>\n",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">"<text x=\"%f\" y=\"%f\" font-family=\"Arial\" font-size=\"7\">%s</text>\n"</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,"<text x=\"%f\" y=\"%f\" font-family=\"Courier\" font-size=\"7\" fill=\"#000000\">%s</text>\n",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">"<circle cx=\"%f\" cy=\"%f\" r=\"1\"/>\n"</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">"<text x=\"%f\" y=\"%f\" textLength=\"%f\" lengthAdjust=\"spacingAndGlyphs\" style=\"stroke: red; stroke-width:0.3; fill:red; text-anchor:middle;\">%d : %s</text>\n"</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">"<text x=\"%f\" y=\"%f\" textLength=\"%f\" lengthAdjust=\"spacingAndGlyphs\" style=\"stroke: red; stroke-width:0.3; fill:none; text-anchor:middle;\">%s</text>\n"</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 <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> </body> </html>