/usr/share/doc/mlpost/html/Mlpost.MetaPath.html is in libmlpost-ocaml-doc 0.8.1-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Mlpost.Point.html">
<link rel="next" href="Mlpost.Path.html">
<link rel="Up" href="Mlpost.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class attributes" rel=Appendix href="index_attributes.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Mlpost" rel="Chapter" href="Mlpost.html">
<link title="Mlpost_dot" rel="Chapter" href="Mlpost_dot.html">
<link title="Mlpost_lablgtk" rel="Chapter" href="Mlpost_lablgtk.html"><link title="Labelled metapath constructors" rel="Section" href="#2_Labelledmetapathconstructors">
<link title="Primitive metapath constructors" rel="Section" href="#2_Primitivemetapathconstructors">
<link title="Predefined values" rel="Section" href="#2_Predefinedvalues">
<link title="Conversions" rel="Section" href="#2_Conversions">
<title>Mlpost.MetaPath</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Mlpost.Point.html" title="Mlpost.Point">Previous</a>
<a class="up" href="Mlpost.html" title="Mlpost">Up</a>
<a class="post" href="Mlpost.Path.html" title="Mlpost.Path">Next</a>
</div>
<h1>Module <a href="type_Mlpost.MetaPath.html">Mlpost.MetaPath</a></h1>
<pre><span class="keyword">module</span> MetaPath: <code class="code">sig</code> <a href="Mlpost.MetaPath.html">..</a> <code class="code">end</code></pre><div class="info module top">
MetaPaths: gradually build a path with constraints, get a real
path at thxe end.<br>
</div>
<hr width="100%">
<br>
MetaPaths are the objects used to describe lines, curves, and
more generally almost everything that is drawn with Mlpost.
A path (<code class="code">Path.t</code>) is defined by points and control points.
A metapath is defined by points (knots) and constraints on the links
between the points. A metapath is an easy way to define a path gradually
with only a few points, and apply heuristics afterwards to transform it
into a real path (using <code class="code">of_metapath</code>).<br>
<pre><span id="TYPEdirection"><span class="keyword">type</span> <code class="type"></code>direction</span> = <code class="type"><a href="Mlpost.Path.html#TYPEdirection">Path.direction</a></code> </pre>
<div class="info ">
A <code class="code">direction</code> is used to put constraints on metapaths:
<ul>
<li><code class="code">vec p</code> defines a direction by a point (interpreted as a vector)</li>
<li><code class="code">curl f</code> changes the curling factor of the extremity of a metapath;
higher curling factor means flatter curves</li>
<li><code class="code">noDir</code> means no particular direction</li>
</ul>
<br>
</div>
<pre><span id="VALvec"><span class="keyword">val</span> vec</span> : <code class="type"><a href="Mlpost.Point.html#TYPEt">Point.t</a> -> <a href="Mlpost.MetaPath.html#TYPEdirection">direction</a></code></pre>
<pre><span id="VALcurl"><span class="keyword">val</span> curl</span> : <code class="type">float -> <a href="Mlpost.MetaPath.html#TYPEdirection">direction</a></code></pre>
<pre><span id="VALnoDir"><span class="keyword">val</span> noDir</span> : <code class="type"><a href="Mlpost.MetaPath.html#TYPEdirection">direction</a></code></pre>
<pre><span id="TYPEknot"><span class="keyword">type</span> <code class="type"></code>knot</span> = <code class="type"><a href="Mlpost.Path.html#TYPEknot">Path.knot</a></code> </pre>
<div class="info ">
A <code class="code">knot</code> is the basic element of a metapath, and is simply a point
with an incoming and outgoing direction constraint<br>
</div>
<pre><span id="VALknotp"><span class="keyword">val</span> knotp</span> : <code class="type">?l:<a href="Mlpost.MetaPath.html#TYPEdirection">direction</a> -><br> ?r:<a href="Mlpost.MetaPath.html#TYPEdirection">direction</a> -> <a href="Mlpost.Point.html#TYPEt">Point.t</a> -> <a href="Mlpost.MetaPath.html#TYPEknot">knot</a></code></pre><div class="info ">
Build a knot from a point; the optional arguments are the
incoming directions<br>
</div>
<pre><span id="VALknotlist"><span class="keyword">val</span> knotlist</span> : <code class="type">(<a href="Mlpost.MetaPath.html#TYPEdirection">direction</a> * <a href="Mlpost.Point.html#TYPEt">Point.t</a> * <a href="Mlpost.MetaPath.html#TYPEdirection">direction</a>) list -><br> <a href="Mlpost.MetaPath.html#TYPEknot">knot</a> list</code></pre>
<pre><span id="TYPEjoint"><span class="keyword">type</span> <code class="type"></code>joint</span> = <code class="type"><a href="Mlpost.Path.html#TYPEjoint">Path.joint</a></code> </pre>
<div class="info ">
A joint is the connection between two knots in a metapath. It is either
<ul>
<li><code class="code">jLine</code> for a straight line</li>
<li><code class="code">jCurve</code> for a spline curve</li>
<li><code class="code">jCurveNoInflex</code> to avoid inflexion points</li>
<li><code class="code">jTension f1 f2</code> to specify "tension" on the joint; <code class="code">jCurve</code> uses a
default tension of 1. Higher tension means less "wild" curves</li>
<li><code class="code">jControls p1 p2</code> to explicitely specify control points</li>
</ul>
<br>
</div>
<pre><span id="VALjLine"><span class="keyword">val</span> jLine</span> : <code class="type"><a href="Mlpost.MetaPath.html#TYPEjoint">joint</a></code></pre>
<pre><span id="VALjCurve"><span class="keyword">val</span> jCurve</span> : <code class="type"><a href="Mlpost.MetaPath.html#TYPEjoint">joint</a></code></pre>
<pre><span id="VALjCurveNoInflex"><span class="keyword">val</span> jCurveNoInflex</span> : <code class="type"><a href="Mlpost.MetaPath.html#TYPEjoint">joint</a></code></pre>
<pre><span id="VALjTension"><span class="keyword">val</span> jTension</span> : <code class="type">float -> float -> <a href="Mlpost.MetaPath.html#TYPEjoint">joint</a></code></pre>
<pre><span id="VALjControls"><span class="keyword">val</span> jControls</span> : <code class="type"><a href="Mlpost.Point.html#TYPEt">Point.t</a> -> <a href="Mlpost.Point.html#TYPEt">Point.t</a> -> <a href="Mlpost.MetaPath.html#TYPEjoint">joint</a></code></pre>
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre>
<div class="info ">
The abstract type of metapaths<br>
</div>
<pre><span id="TYPEpath"><span class="keyword">type</span> <code class="type"></code>path</span> = <code class="type"><a href="Mlpost.Path.html#TYPEt">Path.t</a></code> </pre>
<br>
In all the functions below :<ul>
<li>noDir is the default direction</li>
<li>jCurve is the default joint</li>
</ul>
<br>
<br>
<h2 id="2_Labelledmetapathconstructors">Labelled metapath constructors</h2><br>
<pre><span id="VALknot"><span class="keyword">val</span> knot</span> : <code class="type">?l:<a href="Mlpost.MetaPath.html#TYPEdirection">direction</a> -><br> ?r:<a href="Mlpost.MetaPath.html#TYPEdirection">direction</a> -><br> ?scale:(float -> <a href="Mlpost.Num.html#TYPEt">Num.t</a>) -> float * float -> <a href="Mlpost.MetaPath.html#TYPEknot">knot</a></code></pre><div class="info ">
Build a knot from a pair of floats<br>
</div>
<div class="param_info"><code class="code">l</code> : an incoming direction</div>
<div class="param_info"><code class="code">r</code> : an outgoing direction</div>
<div class="param_info"><code class="code">scale</code> : a scaling factor applied to the floats</div>
<pre><span id="VALknotn"><span class="keyword">val</span> knotn</span> : <code class="type">?l:<a href="Mlpost.MetaPath.html#TYPEdirection">direction</a> -><br> ?r:<a href="Mlpost.MetaPath.html#TYPEdirection">direction</a> -><br> <a href="Mlpost.Num.html#TYPEt">Num.t</a> * <a href="Mlpost.Num.html#TYPEt">Num.t</a> -> <a href="Mlpost.MetaPath.html#TYPEknot">knot</a></code></pre><div class="info ">
Build a knot from a Num.t pair; the optional arguments are as in
<a href="Mlpost.MetaPath.html#VALknot"><code class="code">MetaPath.knot</code></a><br>
</div>
<pre><span id="VALpath"><span class="keyword">val</span> path</span> : <code class="type">?style:<a href="Mlpost.MetaPath.html#TYPEjoint">joint</a> -><br> ?scale:(float -> <a href="Mlpost.Num.html#TYPEt">Num.t</a>) -> (float * float) list -> <a href="Mlpost.MetaPath.html#TYPEt">t</a></code></pre><div class="info ">
Build a metapath from a list of pairs of floats<br>
</div>
<div class="param_info"><code class="code">style</code> : the joint style used for all joints in the metapath</div>
<div class="param_info"><code class="code">scale</code> : permits to scale the whole metapath</div>
<pre><span id="VALpathn"><span class="keyword">val</span> pathn</span> : <code class="type">?style:<a href="Mlpost.MetaPath.html#TYPEjoint">joint</a> -><br> (<a href="Mlpost.Num.html#TYPEt">Num.t</a> * <a href="Mlpost.Num.html#TYPEt">Num.t</a>) list -> <a href="Mlpost.MetaPath.html#TYPEt">t</a></code></pre><div class="info ">
Same as <code class="code">metapath</code>, but uses a <code class="code">Num.t</code> list<br>
</div>
<pre><span id="VALpathk"><span class="keyword">val</span> pathk</span> : <code class="type">?style:<a href="Mlpost.MetaPath.html#TYPEjoint">joint</a> -><br> <a href="Mlpost.MetaPath.html#TYPEknot">knot</a> list -> <a href="Mlpost.MetaPath.html#TYPEt">t</a></code></pre><div class="info ">
Same as <code class="code">metapath</code>, but uses a knot list<br>
</div>
<pre><span id="VALpathp"><span class="keyword">val</span> pathp</span> : <code class="type">?style:<a href="Mlpost.MetaPath.html#TYPEjoint">joint</a> -> <a href="Mlpost.Point.html#TYPEt">Point.t</a> list -> <a href="Mlpost.MetaPath.html#TYPEt">t</a></code></pre><div class="info ">
Same as <code class="code">metapath</code> but uses a point list<br>
</div>
<pre><span id="VALjointpathk"><span class="keyword">val</span> jointpathk</span> : <code class="type"><a href="Mlpost.MetaPath.html#TYPEknot">knot</a> list -> <a href="Mlpost.MetaPath.html#TYPEjoint">joint</a> list -> <a href="Mlpost.MetaPath.html#TYPEt">t</a></code></pre><div class="info ">
Build a metapath from <code class="code">n</code> knots and <code class="code">n-1</code> joints<br>
</div>
<pre><span id="VALjointpathp"><span class="keyword">val</span> jointpathp</span> : <code class="type"><a href="Mlpost.Point.html#TYPEt">Point.t</a> list -> <a href="Mlpost.MetaPath.html#TYPEjoint">joint</a> list -> <a href="Mlpost.MetaPath.html#TYPEt">t</a></code></pre><div class="info ">
Build a metapath from <code class="code">n</code> points and <code class="code">n-1</code> joints,
with default directions<br>
</div>
<pre><span id="VALjointpathn"><span class="keyword">val</span> jointpathn</span> : <code class="type">(<a href="Mlpost.Num.html#TYPEt">Num.t</a> * <a href="Mlpost.Num.html#TYPEt">Num.t</a>) list -><br> <a href="Mlpost.MetaPath.html#TYPEjoint">joint</a> list -> <a href="Mlpost.MetaPath.html#TYPEt">t</a></code></pre>
<pre><span id="VALjointpath"><span class="keyword">val</span> jointpath</span> : <code class="type">?scale:(float -> <a href="Mlpost.Num.html#TYPEt">Num.t</a>) -><br> (float * float) list -> <a href="Mlpost.MetaPath.html#TYPEjoint">joint</a> list -> <a href="Mlpost.MetaPath.html#TYPEt">t</a></code></pre><div class="info ">
Build a metapath from <code class="code">n</code> float_pairs and <code class="code">n-1</code> joints,
with default directions<br>
</div>
<pre><span id="VALcycle"><span class="keyword">val</span> cycle</span> : <code class="type">?dir:<a href="Mlpost.MetaPath.html#TYPEdirection">direction</a> -><br> ?style:<a href="Mlpost.MetaPath.html#TYPEjoint">joint</a> -> <a href="Mlpost.MetaPath.html#TYPEt">t</a> -> <a href="Mlpost.MetaPath.html#TYPEpath">path</a></code></pre><div class="info ">
Close a metapath using direction <code class="code">dir</code> and style <code class="code">style</code><br>
</div>
<br>
<h2 id="2_Primitivemetapathconstructors">Primitive metapath constructors</h2><br>
<pre><span id="VALconcat"><span class="keyword">val</span> concat</span> : <code class="type">?style:<a href="Mlpost.MetaPath.html#TYPEjoint">joint</a> -><br> <a href="Mlpost.MetaPath.html#TYPEt">t</a> -> <a href="Mlpost.MetaPath.html#TYPEknot">knot</a> -> <a href="Mlpost.MetaPath.html#TYPEt">t</a></code></pre><div class="info ">
Add a knot at the end of a metapath<br>
</div>
<pre><span id="VALstart"><span class="keyword">val</span> start</span> : <code class="type"><a href="Mlpost.MetaPath.html#TYPEknot">knot</a> -> <a href="Mlpost.MetaPath.html#TYPEt">t</a></code></pre><div class="info ">
Create a simple metapath with one knot<br>
</div>
<pre><span id="VALappend"><span class="keyword">val</span> append</span> : <code class="type">?style:<a href="Mlpost.MetaPath.html#TYPEjoint">joint</a> -><br> <a href="Mlpost.MetaPath.html#TYPEt">t</a> -> <a href="Mlpost.MetaPath.html#TYPEt">t</a> -> <a href="Mlpost.MetaPath.html#TYPEt">t</a></code></pre><div class="info ">
Append a metapath to another using joint <code class="code">style</code><br>
</div>
<br>
<h2 id="2_Predefinedvalues">Predefined values</h2><br>
<pre><span id="VALdefaultjoint"><span class="keyword">val</span> defaultjoint</span> : <code class="type"><a href="Mlpost.MetaPath.html#TYPEjoint">joint</a></code></pre><div class="info ">
The default joint style (<code class="code">JCurve</code>)<br>
</div>
<br>
<h2 id="2_Conversions">Conversions</h2><br>
<pre><span id="VALto_path"><span class="keyword">val</span> to_path</span> : <code class="type"><a href="Mlpost.MetaPath.html#TYPEt">t</a> -> <a href="Mlpost.MetaPath.html#TYPEpath">path</a></code></pre><div class="info ">
Compute the control point of the path
for a good looking result according to the constraint
on the direction, tension, curve<br>
</div>
<pre><span id="VALof_path"><span class="keyword">val</span> of_path</span> : <code class="type"><a href="Mlpost.MetaPath.html#TYPEpath">path</a> -> <a href="Mlpost.MetaPath.html#TYPEt">t</a></code></pre><div class="info ">
Obtain a metapath from a path with exactly the same
control point. p = of_metapath (of_path p) is true but
not the opposite.<br>
</div>
</body></html>
|