Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 27fc3816ce7bb7b951b682a64459b8dd > files > 19

vizant-0.1.0-7.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO8859-1">
<title>Vizant examples</title>
<link rel="stylesheet" href="main.css" media="all">
</head>
<body>

<h1>Vizant Examples</h1>
<p class="updated">$Date: 2002/06/17 13:15:55 $ - [ English | Japanese ]</p>

<h2>About this page</h2>

<p>This page shows some examples of <a href="index.html">Vizant</a> output.</p>

<ul>
<li><a href="#ant">Ant 1.5beta1 - build.xml</a></li>
<li><a href="#log4j">Log4J 1.2 - build.xml</a></li>
<li><a href="#tomcat">Tomcat 3.3.1 - build.xml</a></li>
</ul>

<h2><a name="ant">Ant 1.5beta1 - build.xml</a></h2>

<p>The most simple way to create image from buildfile is like this.</p>

<blockquote>
&lt;target name="main"&gt;<br>
<strong>&lt;vizant antfile="build.xml" outfile="build.dot"/&gt;</strong><br>
&lt;exec executable="dot" &gt;&lt;arg line="-Tpng build.dot -o build.png"/&gt;&lt;/exec&gt;<br>
&lt;/target&gt;
</blockquote>

<p>The vizant task creates <a href="./ant15b1/ant15b1_1.dot.txt">build.dot</a>, then the <a href="http://www.research.att.com/sw/tools/graphviz/" target="_blank">Graphviz</a> <a href="http://www.research.att.com/~erg/graphviz/info/command.html" target="_blank">dot command</a> produces the next image.</p>

<p><a href="./ant15b1/ant15b1_1.png"><img src="./ant15b1/ant15b1_1s.png"></a></p>

<p>The <strong>from</strong> attribute cut down the branches that the target doesn't depend on. </p>

<blockquote>
&lt;target name="main"&gt;<br>
&lt;vizant antfile="build.xml" outfile="build.dot"
 <strong>from="distribution"</strong>/&gt;<br>
&lt;exec executable="dot" &gt;&lt;arg line="-Tpng build.dot -o build.png"/&gt;&lt;/exec&gt;<br>
&lt;/target&gt;
</blockquote>

<p><a href="./ant15b1/ant15b1_2.png"><img src="./ant15b1/ant15b1_2s.png"></a></p>

<p>In the same way, the <strong>to</strong> attribute cut down the branches that the target isn't depended from. </p>

<blockquote>
&lt;target name="main"&gt;<br>
&lt;vizant antfile="build.xml" outfile="build.dot"
 <strong>to="prepare"</strong>/&gt;<br>
&lt;exec executable="dot" &gt;&lt;arg line="-Tpng build.dot -o build.png"/&gt;&lt;/exec&gt;<br>
&lt;/target&gt;
</blockquote>

<p><a href="./ant15b1/ant15b1_3.png"><img src="./ant15b1/ant15b1_3s.png"></a></p>

<p>You can set <a href="http://www.research.att.com/~erg/graphviz/info/attrs.html" target="_blank">DOT attribute</a> using nested elements: <strong>attrstmt</strong>,
<strong>attr</strong> and <strong>subgraph</strong>. </p>

<blockquote>

&lt;target name="main"&gt;<br>
&lt;vizant antfile="build.xml" outfile="build.dot"&gt;<br>
<br>
<strong>
&lt;attrstmt type="node"&gt;<br>
&lt;attr name="URL" value="javascript:alert('\N');"/&gt;<br>
&lt;attr name="color" value="grey90"/&gt;<br>
&lt;attr name="style" value="filled"/&gt;<br>
&lt;/attrstmt&gt;<br>
<br>
&lt;attrstmt type="edge"&gt;<br>
&lt;attr name="color" value="grey70"/&gt;<br>
&lt;/attrstmt&gt;<br>
<br>
&lt;attrstmt type="edge.antcall"&gt;<br>
&lt;attr name="label" value="antcall"/&gt;<br>
&lt;attr name="fontcolor" value="gray70"/&gt;<br>
&lt;attr name="fontsize" value="9"/&gt;<br>
&lt;/attrstmt&gt;<br>
<br>
&lt;attrstmt type="node.default"&gt;<br>
&lt;attr name="color" value="pink"/&gt;<br>
&lt;/attrstmt&gt;<br>
</strong>
<br>
&lt;/vizant&gt;<br>
<br>
&lt;exec executable="dot" &gt;&lt;arg line="-Tpng build.dot -o build.png"/&gt;&lt;/exec&gt;<br>
&lt;exec executable="dot" &gt;&lt;arg line="-T<strong>svg</strong> build.dot -o <strong>build.svg</strong>"/&gt;&lt;/exec&gt;<br>
&lt;/target&gt;

</blockquote>
<p>The above target creates <a href="./ant15b1/ant15b1_4.dot.txt">build.dot</a> and the next image.</p>

<p><a href="./ant15b1/ant15b1_4.png"><img src="./ant15b1/ant15b1_4s.png"></a></p>
<p>This sample also creates <a href="./ant15b1/ant15b1_4.svg">SVG format file</a>.</p>


<h2><a name="log4j">Log4J 1.2 - build.xml</a></h2>

<p><a href="./log4j12/log4j12_1.png"><img src="./log4j12/log4j12_1s.png"></a></p>

<p><strong>from</strong>="chainsaw"</p>
<p><a href="./log4j12/log4j12_2.png"><img src="./log4j12/log4j12_2s.png"></a></p>
<p><strong>to</strong>="init"</p>
<p><a href="./log4j12/log4j12_3.png"><img src="./log4j12/log4j12_3s.png"></a></p>

<p>with the attributes same with above Ant sample.</p>
<p><a href="./log4j12/log4j12_4.png"><img src="./log4j12/log4j12_4s.png"></a></p>
<p><a href="./log4j12/log4j12_4.svg">SVG file</a></p>

<h2><a name="tomcat">Tomcat 3.3.1 - build.xml</a></h2>

<p><a href="./tomcat331/tomcat331_1.png"><img src="./tomcat331/tomcat331_1s.png"></a></p>

<p><strong>from</strong>="dist"</p>
<p><a href="./tomcat331/tomcat331_2.png"><img src="./tomcat331/tomcat331_2s.png"></a></p>

<p><strong>to</strong>="prepare"</p>
<p><a href="./tomcat331/tomcat331_3.png"><img src="./tomcat331/tomcat331_3s.png"></a></p>


<p><strong>from</strong>="dist" <strong>to</strong>="prepare"</p>
<p><a href="./tomcat331/tomcat331_5.png"><img src="./tomcat331/tomcat331_5s.png"></a></p>

<p>The next example add some more attributes.</p>
<blockquote>
&lt;target name="main"&gt;<br>
&lt;vizant antfile="build.xml" outfile="build.dot"&gt;<br>
<br>
<strong>
&lt;attrstmt type="graph"&gt;
&lt;!-- make graph larger --&gt;<br>
&lt;attr name="ranksep" value="1.2"/&gt;<br>
&lt;attr name="nodesep" value="0.5"/&gt;<br>
&lt;/attrstmt&gt;<br>
</strong>
<br>
&lt;attrstmt type="node"&gt;<br>
&lt;attr name="URL" value="javascript:alert('\N');"/&gt;<br>
&lt;attr name="color" value="grey85"/&gt;<br>
&lt;attr name="style" value="filled"/&gt;<br>
&lt;/attrstmt&gt;<br>
<br>
&lt;attrstmt type="edge"&gt;<br>
&lt;attr name="color" value="grey70"/&gt;<br>
&lt;/attrstmt&gt;<br>
<br>
&lt;attrstmt type="edge.antcall"&gt;<br>
&lt;attr name="label" value="antcall"/&gt;<br>
&lt;attr name="fontcolor" value="gray70"/&gt;<br>
&lt;attr name="fontsize" value="9"/&gt;<br>
&lt;/attrstmt&gt;<br>
<br>
&lt;attrstmt type="node.default"&gt;<br>
&lt;attr name="color" value="pink"/&gt;<br>
&lt;/attrstmt&gt;<br>
<br>
<strong>
&lt;subgraph&gt;<br>
&lt;attrstmt type="graph"&gt;<br>
&lt;attr name="style" value="filled"/&gt;<br>
&lt;attr name="color" value="grey95"/&gt;<br>
&lt;/attrstmt&gt;<br>
&lt;/subgraph&gt;<br>
</strong>
<br>
&lt;/vizant&gt;
<br>
&lt;exec executable="dot" &gt;&lt;arg line="-Tpng build.dot -o build.png"/&gt;&lt;/exec&gt;<br>
&lt;exec executable="dot" &gt;&lt;arg line="-T<strong>svg</strong> build.dot -o <strong>build.svg</strong>"/&gt;&lt;/exec&gt;<br>
&lt;/target&gt;
</blockquote>

<p>The above creates <a href="./tomcat331/tomcat331_4.dot">build.dot</a> file and the next image and SVG file.</p>
<p><a href="./tomcat331/tomcat331_4.png"><img src="./tomcat331/tomcat331_4s.png"></a></p>

<p><a href="./tomcat331/tomcat331_4.svg">SVG file</a></p>

<hr>
<address><a href="http://www.teria.com/~koseki/index_en.html">KOSEKI Kengo</a> &lt;<a href="mailto:kengo@tt.rim.or.jp">kengo@tt.rim.or.jp</a>&gt;</address>

</body>
</html>