/usr/share/doc/mlpost/html/Mlpost.Path.html is in libmlpost-ocaml-doc 0.8.1-8build1.
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 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | <!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">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link rel="previous" href="Mlpost.MetaPath.html">
<link rel="next" href="Mlpost.Brush.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 path constructors" rel="Section" href="#2_Labelledpathconstructors">
<link title="Primitive path constructors" rel="Section" href="#2_Primitivepathconstructors">
<link title="More complex constructions on paths" rel="Section" href="#2_Morecomplexconstructionsonpaths">
<link title="Predefined values" rel="Section" href="#2_Predefinedvalues">
<link title="Conversions" rel="Section" href="#2_Conversions">
<link title="Smart path " rel="Section" href="#2_Smartpath">
<title>Mlpost.Path</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Mlpost.MetaPath.html" title="Mlpost.MetaPath">Previous</a>
<a class="up" href="Mlpost.html" title="Mlpost">Up</a>
<a class="post" href="Mlpost.Brush.html" title="Mlpost.Brush">Next</a>
</div>
<h1>Module <a href="type_Mlpost.Path.html">Mlpost.Path</a></h1>
<pre><span class="keyword">module</span> Path: <code class="code">sig</code> <a href="Mlpost.Path.html">..</a> <code class="code">end</code></pre><div class="info module top">
Fixed Paths<br>
</div>
<hr width="100%">
<br>
Paths are the objects used to describe lines, curves, and
more generally almost everything that is drawn with Mlpost<br>
<pre><span id="TYPEdirection"><span class="keyword">type</span> <code class="type"></code>direction</span> </pre>
<div class="info ">
A <code class="code">direction</code> is used to put constraints on paths:
<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 path;
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.Path.html#TYPEdirection">direction</a></code></pre>
<pre><span id="VALcurl"><span class="keyword">val</span> curl</span> : <code class="type">float -> <a href="Mlpost.Path.html#TYPEdirection">direction</a></code></pre>
<pre><span id="VALnoDir"><span class="keyword">val</span> noDir</span> : <code class="type"><a href="Mlpost.Path.html#TYPEdirection">direction</a></code></pre>
<pre><span id="TYPEknot"><span class="keyword">type</span> <code class="type"></code>knot</span> </pre>
<div class="info ">
A <code class="code">knot</code> is the basic element of a path, 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.Path.html#TYPEdirection">direction</a> -><br> ?r:<a href="Mlpost.Path.html#TYPEdirection">direction</a> -> <a href="Mlpost.Point.html#TYPEt">Point.t</a> -> <a href="Mlpost.Path.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.Path.html#TYPEdirection">direction</a> * <a href="Mlpost.Point.html#TYPEt">Point.t</a> * <a href="Mlpost.Path.html#TYPEdirection">direction</a>) list -><br> <a href="Mlpost.Path.html#TYPEknot">knot</a> list</code></pre>
<pre><span id="TYPEjoint"><span class="keyword">type</span> <code class="type"></code>joint</span> </pre>
<div class="info ">
A joint is the connection between two knots in a path. 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.Path.html#TYPEjoint">joint</a></code></pre>
<pre><span id="VALjCurve"><span class="keyword">val</span> jCurve</span> : <code class="type"><a href="Mlpost.Path.html#TYPEjoint">joint</a></code></pre>
<pre><span id="VALjCurveNoInflex"><span class="keyword">val</span> jCurveNoInflex</span> : <code class="type"><a href="Mlpost.Path.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.Path.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.Path.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 paths<br>
</div>
<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_Labelledpathconstructors">Labelled path constructors</h2><br>
<pre><span id="VALknot"><span class="keyword">val</span> knot</span> : <code class="type">?l:<a href="Mlpost.Path.html#TYPEdirection">direction</a> -><br> ?r:<a href="Mlpost.Path.html#TYPEdirection">direction</a> -><br> ?scale:(float -> <a href="Mlpost.Num.html#TYPEt">Num.t</a>) -> float * float -> <a href="Mlpost.Path.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.Path.html#TYPEdirection">direction</a> -><br> ?r:<a href="Mlpost.Path.html#TYPEdirection">direction</a> -> <a href="Mlpost.Num.html#TYPEt">Num.t</a> * <a href="Mlpost.Num.html#TYPEt">Num.t</a> -> <a href="Mlpost.Path.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.Path.html#VALknot"><code class="code">Path.knot</code></a><br>
</div>
<pre><span id="VALpath"><span class="keyword">val</span> path</span> : <code class="type">?style:<a href="Mlpost.Path.html#TYPEjoint">joint</a> -><br> ?cycle:<a href="Mlpost.Path.html#TYPEjoint">joint</a> -><br> ?scale:(float -> <a href="Mlpost.Num.html#TYPEt">Num.t</a>) -> (float * float) list -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
Build a path 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 path</div>
<div class="param_info"><code class="code">cycle</code> : if given, the path is closed using the given style</div>
<div class="param_info"><code class="code">scale</code> : permits to scale the whole path</div>
<pre><span id="VALpathn"><span class="keyword">val</span> pathn</span> : <code class="type">?style:<a href="Mlpost.Path.html#TYPEjoint">joint</a> -><br> ?cycle:<a href="Mlpost.Path.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.Path.html#TYPEt">t</a></code></pre><div class="info ">
Same as <code class="code">path</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.Path.html#TYPEjoint">joint</a> -><br> ?cycle:<a href="Mlpost.Path.html#TYPEjoint">joint</a> -> <a href="Mlpost.Path.html#TYPEknot">knot</a> list -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
Same as <code class="code">path</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.Path.html#TYPEjoint">joint</a> -><br> ?cycle:<a href="Mlpost.Path.html#TYPEjoint">joint</a> -> <a href="Mlpost.Point.html#TYPEt">Point.t</a> list -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
Same as <code class="code">path</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.Path.html#TYPEknot">knot</a> list -> <a href="Mlpost.Path.html#TYPEjoint">joint</a> list -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
Build a path 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.Path.html#TYPEjoint">joint</a> list -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
Build a path 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 -> <a href="Mlpost.Path.html#TYPEjoint">joint</a> list -> <a href="Mlpost.Path.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.Path.html#TYPEjoint">joint</a> list -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
Build a path 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.Path.html#TYPEdirection">direction</a> -><br> ?style:<a href="Mlpost.Path.html#TYPEjoint">joint</a> -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
Close a path using direction <code class="code">dir</code> and style <code class="code">style</code><br>
</div>
<br>
<h2 id="2_Primitivepathconstructors">Primitive path constructors</h2><br>
<pre><span id="VALconcat"><span class="keyword">val</span> concat</span> : <code class="type">?style:<a href="Mlpost.Path.html#TYPEjoint">joint</a> -><br> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Path.html#TYPEknot">knot</a> -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
Add a knot at the end of a path<br>
</div>
<pre><span id="VALstart"><span class="keyword">val</span> start</span> : <code class="type"><a href="Mlpost.Path.html#TYPEknot">knot</a> -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
Create a simple path with one knot<br>
</div>
<pre><span id="VALappend"><span class="keyword">val</span> append</span> : <code class="type">?style:<a href="Mlpost.Path.html#TYPEjoint">joint</a> -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
Append a path to another using joint <code class="code">style</code><br>
</div>
<br>
<h2 id="2_Morecomplexconstructionsonpaths">More complex constructions on paths</h2><br>
<pre><span id="VALlength"><span class="keyword">val</span> length</span> : <code class="type"><a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Num.html#TYPEt">Num.t</a></code></pre><div class="info ">
Number of nodes in a path, minus one.<br>
</div>
<pre><span id="VALpoint"><span class="keyword">val</span> point</span> : <code class="type">float -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Point.html#TYPEt">Point.t</a></code></pre><div class="info ">
<code class="code">point f p</code> returns a certain point on the path <code class="code">p</code>; <code class="code">f</code> is
given "in control points": <code class="code">0.</code> means the first control point,
<code class="code">1.</code> the second and so on; intermediate values are accepted.<br>
</div>
<pre><span id="VALpointn"><span class="keyword">val</span> pointn</span> : <code class="type"><a href="Mlpost.Num.html#TYPEt">Num.t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Point.html#TYPEt">Point.t</a></code></pre><div class="info ">
Same as <code class="code">point</code> but for a <code class="code">Num.t</code>.<br>
</div>
<pre><span id="VALdirection"><span class="keyword">val</span> direction</span> : <code class="type">float -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Point.html#TYPEt">Point.t</a></code></pre><div class="info ">
<code class="code">direction f p</code> returns the direction of the tangent at <code class="code">point f p</code>.<br>
</div>
<pre><span id="VALdirectionn"><span class="keyword">val</span> directionn</span> : <code class="type"><a href="Mlpost.Num.html#TYPEt">Num.t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Point.html#TYPEt">Point.t</a></code></pre><div class="info ">
Same as <code class="code">direction</code> but for a <code class="code">Num.t</code>.<br>
</div>
<pre><span id="VALsubpath"><span class="keyword">val</span> subpath</span> : <code class="type">float -> float -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
<code class="code">subpath start end path</code> selects the subpath of <code class="code">path</code> that lies
between <code class="code">start</code> and <code class="code">end</code>. <code class="code">start</code> and <code class="code">end</code> are given in
control points, as in <a href="Mlpost.Path.html#VALpoint"><code class="code">Path.point</code></a>.<br>
</div>
<pre><span id="VALsubpathn"><span class="keyword">val</span> subpathn</span> : <code class="type"><a href="Mlpost.Num.html#TYPEt">Num.t</a> -> <a href="Mlpost.Num.html#TYPEt">Num.t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
Same as <code class="code">subpathn</code> but using <code class="code">Num.t</code>.<br>
</div>
<pre><span id="VALtransform"><span class="keyword">val</span> transform</span> : <code class="type"><a href="Mlpost.Transform.html#TYPEt">Transform.t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
Apply a transformation to a path<br>
</div>
<pre><span id="VALscale"><span class="keyword">val</span> scale</span> : <code class="type"><a href="Mlpost.Num.html#TYPEt">Num.t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre>
<pre><span id="VALrotate"><span class="keyword">val</span> rotate</span> : <code class="type">float -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre>
<pre><span id="VALshift"><span class="keyword">val</span> shift</span> : <code class="type"><a href="Mlpost.Point.html#TYPEt">Point.t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre>
<pre><span id="VALyscale"><span class="keyword">val</span> yscale</span> : <code class="type"><a href="Mlpost.Num.html#TYPEt">Num.t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre>
<pre><span id="VALxscale"><span class="keyword">val</span> xscale</span> : <code class="type"><a href="Mlpost.Num.html#TYPEt">Num.t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
Shortcuts for transformations of Paths<br>
</div>
<pre><span id="VALcut_after"><span class="keyword">val</span> cut_after</span> : <code class="type"><a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
<code class="code">cut_after p1 p2</code> cuts <code class="code">p2</code> after the intersection with <code class="code">p1</code>.
To memorize the order of the arguments,
you can read: "cut after <code class="code">p1</code>"<br>
</div>
<pre><span id="VALcut_before"><span class="keyword">val</span> cut_before</span> : <code class="type"><a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
Same as <a href="Mlpost.Path.html#VALcut_after"><code class="code">Path.cut_after</code></a>, but cuts before<br>
</div>
<pre><span id="VALstrip"><span class="keyword">val</span> strip</span> : <code class="type"><a href="Mlpost.Num.html#TYPEt">Num.t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
<code class="code">strip n p</code> removes two segments of length <code class="code">n</code> at each end of path <code class="code">p</code><br>
</div>
<pre><span id="VALbuild_cycle"><span class="keyword">val</span> build_cycle</span> : <code class="type"><a href="Mlpost.Path.html#TYPEt">t</a> list -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
Build a cycle from a set of intersecting paths<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.Path.html#TYPEjoint">joint</a></code></pre><div class="info ">
The default joint style (<code class="code">JCurve</code>)<br>
</div>
<pre><span id="VALfullcircle"><span class="keyword">val</span> fullcircle</span> : <code class="type"><a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
A full circle of radius 1 and centered on the origin<br>
</div>
<pre><span id="VALhalfcircle"><span class="keyword">val</span> halfcircle</span> : <code class="type"><a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
The upper half of <code class="code">fullcircle</code><br>
</div>
<pre><span id="VALquartercircle"><span class="keyword">val</span> quartercircle</span> : <code class="type"><a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
The right half of <code class="code">halfcircle</code><br>
</div>
<pre><span id="VALunitsquare"><span class="keyword">val</span> unitsquare</span> : <code class="type"><a href="Mlpost.Path.html#TYPEt">t</a></code></pre><div class="info ">
A full square of size 1 and centered on the origin<br>
</div>
<br>
<h2 id="2_Conversions">Conversions</h2><br>
<pre><span id="TYPEmetapath"><span class="keyword">type</span> <code class="type"></code>metapath</span> = <code class="type"><a href="Mlpost.MetaPath.html#TYPEt">MetaPath.t</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_metapath"><span class="keyword">val</span> of_metapath</span> : <code class="type"><a href="Mlpost.Path.html#TYPEmetapath">metapath</a> -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre>
<pre><span id="VALto_metapath"><span class="keyword">val</span> to_metapath</span> : <code class="type"><a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Path.html#TYPEmetapath">metapath</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>
<br>
<h2 id="2_Smartpath">Smart path </h2><br>
<pre><code><span id="TYPEorientation"><span class="keyword">type</span> <code class="type"></code>orientation</span> = </code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTorientation.Up"><span class="constructor">Up</span></span></code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTorientation.Down"><span class="constructor">Down</span></span></code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTorientation.Left"><span class="constructor">Left</span></span></code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTorientation.Right"><span class="constructor">Right</span></span></code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTorientation.Upn"><span class="constructor">Upn</span></span> <span class="keyword">of</span> <code class="type"><a href="Mlpost.Num.html#TYPEt">Num.t</a></code></code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTorientation.Downn"><span class="constructor">Downn</span></span> <span class="keyword">of</span> <code class="type"><a href="Mlpost.Num.html#TYPEt">Num.t</a></code></code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTorientation.Leftn"><span class="constructor">Leftn</span></span> <span class="keyword">of</span> <code class="type"><a href="Mlpost.Num.html#TYPEt">Num.t</a></code></code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTorientation.Rightn"><span class="constructor">Rightn</span></span> <span class="keyword">of</span> <code class="type"><a href="Mlpost.Num.html#TYPEt">Num.t</a></code></code></td>
</tr></table>
<pre><span id="VALsmart_path"><span class="keyword">val</span> smart_path</span> : <code class="type">?style:<a href="Mlpost.Path.html#TYPEjoint">joint</a> -><br> <a href="Mlpost.Path.html#TYPEorientation">orientation</a> list -><br> <a href="Mlpost.Point.html#TYPEt">Point.t</a> -> <a href="Mlpost.Point.html#TYPEt">Point.t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a></code></pre>
<pre><span id="VALdraw"><span class="keyword">val</span> draw</span> : <code class="type">?brush:<a href="Mlpost.Brush.html#TYPEt">Brush.t</a> -><br> ?color:<a href="Mlpost.Color.html#TYPEt">Color.t</a> -><br> ?pen:Pen.t -><br> ?dashed:Dash.t -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Command.html#TYPEt">Command.t</a></code></pre><div class="info ">
Draw a path<br>
</div>
<div class="param_info"><code class="code">brush</code> : the brush used to draw the path; the next argument
redefined this one</div>
<div class="param_info"><code class="code">color</code> : the color of the path; default is black</div>
<div class="param_info"><code class="code">pen</code> : the pen used to draw the path; default is
<code class="code">Brush.Pen.default</code></div>
<div class="param_info"><code class="code">dashed</code> : if given, the path is drawn using that dash_style.</div>
<pre><span id="VALfill"><span class="keyword">val</span> fill</span> : <code class="type">?color:<a href="Mlpost.Color.html#TYPEt">Color.t</a> -> <a href="Mlpost.Path.html#TYPEt">t</a> -> <a href="Mlpost.Command.html#TYPEt">Command.t</a></code></pre><div class="info ">
Fill a contour given by a closed path<br>
</div>
<div class="param_info"><code class="code">color</code> : the color used to fill the area; default is black</div>
</body></html>
|