This file is indexed.

/usr/share/doc/libghc-diagrams-lib-doc/html/Diagrams-Trace.html is in libghc-diagrams-lib-doc 1.3.0.8-1.

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
<!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/html; charset=UTF-8" /><title>Diagrams.Trace</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Diagrams-Trace.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Diagrams-Trace.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">diagrams-lib-1.3.0.8: Embedded domain-specific language for declarative graphics</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>(c) 2013 diagrams-lib team (see LICENSE)</td></tr><tr><th>License</th><td>BSD-style (see LICENSE)</td></tr><tr><th>Maintainer</th><td>diagrams-discuss@googlegroups.com</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Diagrams.Trace</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Types</a></li><li><a href="#g:2">Diagram traces</a></li><li><a href="#g:3">Querying traces</a></li><li><a href="#g:4">Subdiagram traces</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>&quot;Traces&quot;, aka embedded raytracers, for finding points on the edge
 of a diagram.  See <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Trace.html">Diagrams.Core.Trace</a> for internal
 implementation details.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Trace">Trace</a> v n :: (* -&gt; *) -&gt; * -&gt; *</li><li class="src short"><span class="keyword">class</span> (<a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Vector.html#t:Additive">Additive</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a), <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:N">N</a> a)) =&gt; <a href="#t:Traced">Traced</a> a</li><li class="src short"><a href="#v:trace">trace</a> :: (<a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Metric.html#t:Metric">Metric</a> v, <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n, <a href="file:///usr/share/doc/libghc-semigroups-doc/html/Data-Semigroup.html#t:Semigroup">Semigroup</a> m) =&gt; <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Lens-39-">Lens'</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Types.html#t:QDiagram">QDiagram</a> b v n m) (<a href="Diagrams-Trace.html#t:Trace">Trace</a> v n)</li><li class="src short"><a href="#v:setTrace">setTrace</a> :: (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n, <a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Metric.html#t:Metric">Metric</a> v, <a href="file:///usr/share/doc/libghc-semigroups-doc/html/Data-Semigroup.html#t:Semigroup">Semigroup</a> m) =&gt; <a href="Diagrams-Trace.html#t:Trace">Trace</a> v n -&gt; <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Types.html#t:QDiagram">QDiagram</a> b v n m -&gt; <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Types.html#t:QDiagram">QDiagram</a> b v n m</li><li class="src short"><a href="#v:withTrace">withTrace</a> :: (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:InSpace">InSpace</a> v n a, <a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Metric.html#t:Metric">Metric</a> v, <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n, <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core.html#t:Monoid-39-">Monoid'</a> m, <a href="Diagrams-Trace.html#t:Traced">Traced</a> a) =&gt; a -&gt; <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Types.html#t:QDiagram">QDiagram</a> b v n m -&gt; <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Types.html#t:QDiagram">QDiagram</a> b v n m</li><li class="src short"><a href="#v:traceV">traceV</a> :: ((~) * n (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:N">N</a> a), <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Num">Num</a> n, <a href="Diagrams-Trace.html#t:Traced">Traced</a> a) =&gt; <a href="Diagrams-Points.html#t:Point">Point</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a) n -&gt; <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a n -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a n)</li><li class="src short"><a href="#v:traceP">traceP</a> :: ((~) * n (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:N">N</a> a), <a href="Diagrams-Trace.html#t:Traced">Traced</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Num">Num</a> n) =&gt; <a href="Diagrams-Points.html#t:Point">Point</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a) n -&gt; <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a n -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Diagrams-Points.html#t:Point">Point</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a) n)</li><li class="src short"><a href="#v:maxTraceV">maxTraceV</a> :: ((~) * n (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:N">N</a> a), <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Num">Num</a> n, <a href="Diagrams-Trace.html#t:Traced">Traced</a> a) =&gt; <a href="Diagrams-Points.html#t:Point">Point</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a) n -&gt; <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a n -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a n)</li><li class="src short"><a href="#v:maxTraceP">maxTraceP</a> :: ((~) * n (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:N">N</a> a), <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Num">Num</a> n, <a href="Diagrams-Trace.html#t:Traced">Traced</a> a) =&gt; <a href="Diagrams-Points.html#t:Point">Point</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a) n -&gt; <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a n -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Diagrams-Points.html#t:Point">Point</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a) n)</li><li class="src short"><a href="#v:boundaryFrom">boundaryFrom</a> :: (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n, <a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Metric.html#t:Metric">Metric</a> v, <a href="file:///usr/share/doc/libghc-semigroups-doc/html/Data-Semigroup.html#t:Semigroup">Semigroup</a> m) =&gt; <a href="Diagrams-Names.html#t:Subdiagram">Subdiagram</a> b v n m -&gt; v n -&gt; <a href="Diagrams-Points.html#t:Point">Point</a> v n</li><li class="src short"><a href="#v:boundaryFromMay">boundaryFromMay</a> :: (<a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Metric.html#t:Metric">Metric</a> v, <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n, <a href="file:///usr/share/doc/libghc-semigroups-doc/html/Data-Semigroup.html#t:Semigroup">Semigroup</a> m) =&gt; <a href="Diagrams-Names.html#t:Subdiagram">Subdiagram</a> b v n m -&gt; v n -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Diagrams-Points.html#t:Point">Point</a> v n)</li></ul></div><div id="interface"><h1 id="g:1">Types</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Trace" class="def">Trace</a> v n :: (* -&gt; *) -&gt; * -&gt; *</p><div class="doc"><p>Every diagram comes equipped with a <em>trace</em>.  Intuitively, the
   trace for a diagram is like a raytracer: given a line
   (represented as a base point and a direction vector), the trace
   computes a sorted list of signed distances from the base point to
   all intersections of the line with the boundary of the
   diagram.</p><p>Note that the outputs are not absolute distances, but multipliers
   relative to the input vector.  That is, if the base point is <code>p</code>
   and direction vector is <code>v</code>, and one of the output scalars is
   <code>s</code>, then there is an intersection at the point <code>p .+^ (s *^ v)</code>.</p><p><img src="diagrams/src_Diagrams_Core_Trace_traceEx.svg#diagram=traceEx&amp;width=200" /></p></div><div class="subs instances"><p id="control.i:Trace" class="caption collapser" onclick="toggleSection('i:Trace')">Instances</p><div id="section.i:Trace" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> (<a href="Diagrams-Trace.html#t:Trace">Trace</a> v n)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> n =&gt; <a href="file:///usr/share/doc/libghc-semigroups-doc/html/Data-Semigroup.html#t:Semigroup">Semigroup</a> (<a href="Diagrams-Trace.html#t:Trace">Trace</a> v n)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> n =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Monoid.html#t:Monoid">Monoid</a> (<a href="Diagrams-Trace.html#t:Trace">Trace</a> v n)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Vector.html#t:Additive">Additive</a> v, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> n) =&gt; <a href="Diagrams-Trace.html#t:Traced">Traced</a> (<a href="Diagrams-Trace.html#t:Trace">Trace</a> v n)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Vector.html#t:Additive">Additive</a> v, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Num">Num</a> n) =&gt; <a href="Diagrams-Transform.html#t:Transformable">Transformable</a> (<a href="Diagrams-Trace.html#t:Trace">Trace</a> v n)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Vector.html#t:Additive">Additive</a> v, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Num">Num</a> n) =&gt; <a href="Diagrams-Transform.html#t:HasOrigin">HasOrigin</a> (<a href="Diagrams-Trace.html#t:Trace">Trace</a> v n)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Wrapped.html#t:Wrapped">Wrapped</a> (<a href="Diagrams-Trace.html#t:Trace">Trace</a> v n)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Metric.html#t:Metric">Metric</a> v, <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n) =&gt; <a href="Diagrams-Align.html#t:Alignable">Alignable</a> (<a href="Diagrams-Trace.html#t:Trace">Trace</a> v n)</span> <a href="src/Diagrams-Align.html#line-101" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Wrapped.html#t:Rewrapped">Rewrapped</a> (<a href="Diagrams-Trace.html#t:Trace">Trace</a> v n) (<a href="Diagrams-Trace.html#t:Trace">Trace</a> v' n')</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> (<a href="Diagrams-Trace.html#t:Trace">Trace</a> v n) = v</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:N">N</a> (<a href="Diagrams-Trace.html#t:Trace">Trace</a> v n) = n</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Wrapped.html#t:Unwrapped">Unwrapped</a> (<a href="Diagrams-Trace.html#t:Trace">Trace</a> v n) = <a href="Diagrams-Points.html#t:Point">Point</a> v n -&gt; v n -&gt; <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Trace.html#t:SortedList">SortedList</a> n</span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> (<a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Vector.html#t:Additive">Additive</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a), <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:N">N</a> a)) =&gt; <a name="t:Traced" class="def">Traced</a> a</p><div class="doc"><p><code>Traced</code> abstracts over things which have a trace.</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Trace.html#v:getTrace">getTrace</a></p></div><div class="subs instances"><p id="control.i:Traced" class="caption collapser" onclick="toggleSection('i:Traced')">Instances</p><div id="section.i:Traced" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="Diagrams-Trace.html#t:Traced">Traced</a> b =&gt; <a href="Diagrams-Trace.html#t:Traced">Traced</a> [b]</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Diagrams-Trace.html#t:Traced">Traced</a> b =&gt; <a href="Diagrams-Trace.html#t:Traced">Traced</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.6.2/Data-Set.html#t:Set">Set</a> b)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Diagrams-Trace.html#t:Traced">Traced</a> t =&gt; <a href="Diagrams-Trace.html#t:Traced">Traced</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Transform.html#t:TransInv">TransInv</a> t)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Diagrams-Trace.html#t:Traced">Traced</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Num">Num</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:N">N</a> a)) =&gt; <a href="Diagrams-Trace.html#t:Traced">Traced</a> (<a href="Diagrams-Located.html#t:Located">Located</a> a)</span></td><td class="doc"><p>The trace of a <code>Located a</code> is the trace of the <code>a</code>,
   translated to the location.</p></td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Diagrams-Trace.html#t:Traced">Traced</a> a, <a href="Diagrams-Trace.html#t:Traced">Traced</a> b, <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:SameSpace">SameSpace</a> a b) =&gt; <a href="Diagrams-Trace.html#t:Traced">Traced</a> (a, b)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Diagrams-Trace.html#t:Traced">Traced</a> b =&gt; <a href="Diagrams-Trace.html#t:Traced">Traced</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.6.2/Data-Map-Lazy.html#t:Map">Map</a> k b)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Vector.html#t:Additive">Additive</a> v, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> n) =&gt; <a href="Diagrams-Trace.html#t:Traced">Traced</a> (<a href="Diagrams-Trace.html#t:Trace">Trace</a> v n)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Vector.html#t:Additive">Additive</a> v, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> n) =&gt; <a href="Diagrams-Trace.html#t:Traced">Traced</a> (<a href="Diagrams-Points.html#t:Point">Point</a> v n)</span></td><td class="doc"><p>The trace of a single point is the empty trace, <em>i.e.</em> the one
   which returns no intersection points for every query.  Arguably
   it should return a single finite distance for vectors aimed
   directly at the given point, but due to floating-point inaccuracy
   this is problematic.  Note that the envelope for a single point
   is <em>not</em> the empty envelope (see <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html">Diagrams.Core.Envelope</a>).</p></td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Types.html#t:TypeableFloat">TypeableFloat</a> n =&gt; <a href="Diagrams-Trace.html#t:Traced">Traced</a> (<a href="Diagrams-BoundingBox.html#t:BoundingBox">BoundingBox</a> <a href="Diagrams-ThreeD-Types.html#t:V3">V3</a> n)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:RealFloat">RealFloat</a> n =&gt; <a href="Diagrams-Trace.html#t:Traced">Traced</a> (<a href="Diagrams-BoundingBox.html#t:BoundingBox">BoundingBox</a> <a href="Diagrams-TwoD-Types.html#t:V2">V2</a> n)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Metric.html#t:Metric">Metric</a> v, <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n, <a href="file:///usr/share/doc/libghc-semigroups-doc/html/Data-Semigroup.html#t:Semigroup">Semigroup</a> m) =&gt; <a href="Diagrams-Trace.html#t:Traced">Traced</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Types.html#t:QDiagram">QDiagram</a> b v n m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n, <a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Metric.html#t:Metric">Metric</a> v, <a href="file:///usr/share/doc/libghc-semigroups-doc/html/Data-Semigroup.html#t:Semigroup">Semigroup</a> m) =&gt; <a href="Diagrams-Trace.html#t:Traced">Traced</a> (<a href="Diagrams-Names.html#t:Subdiagram">Subdiagram</a> b v n m)</span></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:2">Diagram traces</h1><div class="top"><p class="src"><a name="v:trace" class="def">trace</a> :: (<a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Metric.html#t:Metric">Metric</a> v, <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n, <a href="file:///usr/share/doc/libghc-semigroups-doc/html/Data-Semigroup.html#t:Semigroup">Semigroup</a> m) =&gt; <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Lens-39-">Lens'</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Types.html#t:QDiagram">QDiagram</a> b v n m) (<a href="Diagrams-Trace.html#t:Trace">Trace</a> v n)</p><div class="doc"><p>Lens onto the <code><a href="Diagrams-Trace.html#t:Trace">Trace</a></code> of a <code><a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Types.html#t:QDiagram">QDiagram</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:setTrace" class="def">setTrace</a> :: (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n, <a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Metric.html#t:Metric">Metric</a> v, <a href="file:///usr/share/doc/libghc-semigroups-doc/html/Data-Semigroup.html#t:Semigroup">Semigroup</a> m) =&gt; <a href="Diagrams-Trace.html#t:Trace">Trace</a> v n -&gt; <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Types.html#t:QDiagram">QDiagram</a> b v n m -&gt; <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Types.html#t:QDiagram">QDiagram</a> b v n m</p><div class="doc"><p>Replace the trace of a diagram.</p></div></div><div class="top"><p class="src"><a name="v:withTrace" class="def">withTrace</a> :: (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:InSpace">InSpace</a> v n a, <a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Metric.html#t:Metric">Metric</a> v, <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n, <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core.html#t:Monoid-39-">Monoid'</a> m, <a href="Diagrams-Trace.html#t:Traced">Traced</a> a) =&gt; a -&gt; <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Types.html#t:QDiagram">QDiagram</a> b v n m -&gt; <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Types.html#t:QDiagram">QDiagram</a> b v n m <a href="src/Diagrams-Combinators.html#withTrace" class="link">Source</a></p><div class="doc"><p>Use the trace from some object as the trace for a diagram, in
   place of the diagram's default trace.</p></div></div><h1 id="g:3">Querying traces</h1><div class="top"><p class="src"><a name="v:traceV" class="def">traceV</a> :: ((~) * n (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:N">N</a> a), <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Num">Num</a> n, <a href="Diagrams-Trace.html#t:Traced">Traced</a> a) =&gt; <a href="Diagrams-Points.html#t:Point">Point</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a) n -&gt; <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a n -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a n)</p><div class="doc"><p>Compute the vector from the given point <code>p</code> to the &quot;smallest&quot;
   boundary intersection along the given vector <code>v</code>.  The
   &quot;smallest&quot; boundary intersection is defined as the one given by
   <code>p .+^ (s *^ v)</code> for the smallest (most negative) value of
   <code>s</code>. Return <code>Nothing</code> if there is no intersection.  See also
   <code><a href="Diagrams-Trace.html#v:traceP">traceP</a></code>.</p><p>See also <code><a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Trace.html#v:rayTraceV">rayTraceV</a></code> which uses the smallest <em>positive</em>
   intersection, which is often more intuitive behavior.</p><p><img src="diagrams/src_Diagrams_Core_Trace_traceVEx.svg#diagram=traceVEx&amp;width=600" /></p></div></div><div class="top"><p class="src"><a name="v:traceP" class="def">traceP</a> :: ((~) * n (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:N">N</a> a), <a href="Diagrams-Trace.html#t:Traced">Traced</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Num">Num</a> n) =&gt; <a href="Diagrams-Points.html#t:Point">Point</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a) n -&gt; <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a n -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Diagrams-Points.html#t:Point">Point</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a) n)</p><div class="doc"><p>Compute the &quot;smallest&quot; boundary point along the line determined
   by the given point <code>p</code> and vector <code>v</code>.  The &quot;smallest&quot; boundary
   point is defined as the one given by <code>p .+^ (s *^ v)</code> for
   the smallest (most negative) value of <code>s</code>. Return <code>Nothing</code> if
   there is no such boundary point.  See also <code><a href="Diagrams-Trace.html#v:traceV">traceV</a></code>.</p><p>See also <code><a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Trace.html#v:rayTraceP">rayTraceP</a></code> which uses the smallest <em>positive</em>
   intersection, which is often more intuitive behavior.</p><p><img src="diagrams/src_Diagrams_Core_Trace_tracePEx.svg#diagram=tracePEx&amp;width=600" /></p></div></div><div class="top"><p class="src"><a name="v:maxTraceV" class="def">maxTraceV</a> :: ((~) * n (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:N">N</a> a), <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Num">Num</a> n, <a href="Diagrams-Trace.html#t:Traced">Traced</a> a) =&gt; <a href="Diagrams-Points.html#t:Point">Point</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a) n -&gt; <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a n -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a n)</p><div class="doc"><p>Like <code><a href="Diagrams-Trace.html#v:traceV">traceV</a></code>, but computes a vector to the &quot;largest&quot; boundary
   point instead of the smallest. (Note, however, the &quot;largest&quot;
   boundary point may still be in the opposite direction from the
   given vector, if all the boundary points are, as in the third
   example shown below.)</p><p><img src="diagrams/src_Diagrams_Core_Trace_maxTraceVEx.svg#diagram=maxTraceVEx&amp;width=600" /></p></div></div><div class="top"><p class="src"><a name="v:maxTraceP" class="def">maxTraceP</a> :: ((~) * n (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:N">N</a> a), <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Num">Num</a> n, <a href="Diagrams-Trace.html#t:Traced">Traced</a> a) =&gt; <a href="Diagrams-Points.html#t:Point">Point</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a) n -&gt; <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a n -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Diagrams-Points.html#t:Point">Point</a> (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-V.html#t:V">V</a> a) n)</p><div class="doc"><p>Like <code><a href="Diagrams-Trace.html#v:traceP">traceP</a></code>, but computes the &quot;largest&quot; boundary point
   instead of the smallest. (Note, however, the &quot;largest&quot; boundary
   point may still be in the opposite direction from the given
   vector, if all the boundary points are.)</p><p><img src="diagrams/src_Diagrams_Core_Trace_maxTracePEx.svg#diagram=maxTracePEx&amp;width=600" /></p></div></div><h1 id="g:4">Subdiagram traces</h1><div class="top"><p class="src"><a name="v:boundaryFrom" class="def">boundaryFrom</a> :: (<a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n, <a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Metric.html#t:Metric">Metric</a> v, <a href="file:///usr/share/doc/libghc-semigroups-doc/html/Data-Semigroup.html#t:Semigroup">Semigroup</a> m) =&gt; <a href="Diagrams-Names.html#t:Subdiagram">Subdiagram</a> b v n m -&gt; v n -&gt; <a href="Diagrams-Points.html#t:Point">Point</a> v n <a href="src/Diagrams-Trace.html#boundaryFrom" class="link">Source</a></p><div class="doc"><p>Compute the furthest point on the boundary of a subdiagram,
   beginning from the location (local origin) of the subdiagram and
   moving in the direction of the given vector.  If there is no such
   point, the origin is returned; see also <code><a href="Diagrams-Trace.html#v:boundaryFromMay">boundaryFromMay</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:boundaryFromMay" class="def">boundaryFromMay</a> :: (<a href="file:///usr/share/doc/libghc-linear-doc/html/Linear-Metric.html#t:Metric">Metric</a> v, <a href="file:///usr/share/doc/libghc-diagrams-core-doc/html/Diagrams-Core-Envelope.html#t:OrderedField">OrderedField</a> n, <a href="file:///usr/share/doc/libghc-semigroups-doc/html/Data-Semigroup.html#t:Semigroup">Semigroup</a> m) =&gt; <a href="Diagrams-Names.html#t:Subdiagram">Subdiagram</a> b v n m -&gt; v n -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Diagrams-Points.html#t:Point">Point</a> v n) <a href="src/Diagrams-Trace.html#boundaryFromMay" class="link">Source</a></p><div class="doc"><p>Compute the furthest point on the boundary of a subdiagram,
   beginning from the location (local origin) of the subdiagram and
   moving in the direction of the given vector, or <code>Nothing</code> if
   there is no such point.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>