This file is indexed.

/usr/share/doc/libghc-gloss-doc/html/Graphics-Gloss-Data-Extent.html is in libghc-gloss-doc 1.7.8.3-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
<!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>Graphics.Gloss.Data.Extent</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_Graphics-Gloss-Data-Extent.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Graphics-Gloss-Data-Extent.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">gloss-1.7.8.3: Painless 2D vector graphics, animations and simulations.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Graphics.Gloss.Data.Extent</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Represents an integral rectangular area of the 2D plane.
   Using <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></code>s (instead of <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Float">Float</a></code>s) for the bounds means we can safely
   compare extents for equality.
</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:Extent">Extent</a> </li><li class="src short"><span class="keyword">type</span> <a href="#t:Coord">Coord</a> = (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)</li><li class="src short"><a href="#v:makeExtent">makeExtent</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a></li><li class="src short"><a href="#v:takeExtent">takeExtent</a> :: <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)</li><li class="src short"><a href="#v:squareExtent">squareExtent</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a></li><li class="src short"><a href="#v:sizeOfExtent">sizeOfExtent</a> :: <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)</li><li class="src short"><a href="#v:isUnitExtent">isUnitExtent</a> :: <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:coordInExtent">coordInExtent</a> :: <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Coord">Coord</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:pointInExtent">pointInExtent</a> :: <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="Graphics-Gloss-Data-Point.html#t:Point">Point</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:centerCoordOfExtent">centerCoordOfExtent</a> :: <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)</li><li class="src short"><a href="#v:cutQuadOfExtent">cutQuadOfExtent</a> :: <a href="Graphics-Gloss-Data-Quad.html#t:Quad">Quad</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a></li><li class="src short"><a href="#v:quadOfCoord">quadOfCoord</a> :: <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Coord">Coord</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Graphics-Gloss-Data-Quad.html#t:Quad">Quad</a></li><li class="src short"><a href="#v:pathToCoord">pathToCoord</a> :: <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Coord">Coord</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> [<a href="Graphics-Gloss-Data-Quad.html#t:Quad">Quad</a>]</li><li class="src short"><a href="#v:intersectSegExtent">intersectSegExtent</a> :: <a href="Graphics-Gloss-Data-Point.html#t:Point">Point</a> -&gt; <a href="Graphics-Gloss-Data-Point.html#t:Point">Point</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Graphics-Gloss-Data-Point.html#t:Point">Point</a></li><li class="src short"><a href="#v:touchesSegExtent">touchesSegExtent</a> :: <a href="Graphics-Gloss-Data-Point.html#t:Point">Point</a> -&gt; <a href="Graphics-Gloss-Data-Point.html#t:Point">Point</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Extent" class="def">Extent</a>  <a href="src/Graphics-Gloss-Data-Extent.html#Extent" class="link">Source</a></p><div class="doc"><p>A rectangular area of the 2D plane.
   We keep the type abstract to ensure that invalid extents cannot be
   constructed.
</p></div><div class="subs instances"><p id="control.i:Extent" class="caption collapser" onclick="toggleSection('i:Extent')">Instances</p><div id="section.i:Extent" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Coord" class="def">Coord</a> = (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)<a href="src/Graphics-Gloss-Data-Extent.html#Coord" class="link">Source</a></p><div class="doc"><p>An integral coordinate.
</p></div></div><div class="top"><p class="src"><a name="v:makeExtent" class="def">makeExtent</a><a href="src/Graphics-Gloss-Data-Extent.html#makeExtent" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>y max (north)
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>y min (south)
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>x max (east)
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>x min (west)
</p></td></tr><tr><td class="src">-&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Construct an extent.
	The north value must be &gt; south, and east &gt; west, else <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#v:error">error</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:takeExtent" class="def">takeExtent</a> :: <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)<a href="src/Graphics-Gloss-Data-Extent.html#takeExtent" class="link">Source</a></p><div class="doc"><p>Take the NSEW components of an extent.
</p></div></div><div class="top"><p class="src"><a name="v:squareExtent" class="def">squareExtent</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a><a href="src/Graphics-Gloss-Data-Extent.html#squareExtent" class="link">Source</a></p><div class="doc"><p>A square extent of a given size.
</p></div></div><div class="top"><p class="src"><a name="v:sizeOfExtent" class="def">sizeOfExtent</a> :: <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)<a href="src/Graphics-Gloss-Data-Extent.html#sizeOfExtent" class="link">Source</a></p><div class="doc"><p>Get the width and height of an extent.
</p></div></div><div class="top"><p class="src"><a name="v:isUnitExtent" class="def">isUnitExtent</a> :: <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Graphics-Gloss-Data-Extent.html#isUnitExtent" class="link">Source</a></p><div class="doc"><p>Check if an extent is a square with a width and height of 1.
</p></div></div><div class="top"><p class="src"><a name="v:coordInExtent" class="def">coordInExtent</a> :: <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Coord">Coord</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Graphics-Gloss-Data-Extent.html#coordInExtent" class="link">Source</a></p><div class="doc"><p>Check whether a coordinate lies inside an extent.
</p></div></div><div class="top"><p class="src"><a name="v:pointInExtent" class="def">pointInExtent</a> :: <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="Graphics-Gloss-Data-Point.html#t:Point">Point</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Graphics-Gloss-Data-Extent.html#pointInExtent" class="link">Source</a></p><div class="doc"><p>Check whether a point lies inside an extent.
</p></div></div><div class="top"><p class="src"><a name="v:centerCoordOfExtent" class="def">centerCoordOfExtent</a> :: <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)<a href="src/Graphics-Gloss-Data-Extent.html#centerCoordOfExtent" class="link">Source</a></p><div class="doc"><p>Get the coordinate that lies at the center of an extent.
</p></div></div><div class="top"><p class="src"><a name="v:cutQuadOfExtent" class="def">cutQuadOfExtent</a> :: <a href="Graphics-Gloss-Data-Quad.html#t:Quad">Quad</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a><a href="src/Graphics-Gloss-Data-Extent.html#cutQuadOfExtent" class="link">Source</a></p><div class="doc"><p>Cut one quadrant out of an extent.
</p></div></div><div class="top"><p class="src"><a name="v:quadOfCoord" class="def">quadOfCoord</a> :: <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Coord">Coord</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Graphics-Gloss-Data-Quad.html#t:Quad">Quad</a><a href="src/Graphics-Gloss-Data-Extent.html#quadOfCoord" class="link">Source</a></p><div class="doc"><p>Get the quadrant that this coordinate lies in, if any.
</p></div></div><div class="top"><p class="src"><a name="v:pathToCoord" class="def">pathToCoord</a> :: <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Coord">Coord</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> [<a href="Graphics-Gloss-Data-Quad.html#t:Quad">Quad</a>]<a href="src/Graphics-Gloss-Data-Extent.html#pathToCoord" class="link">Source</a></p><div class="doc"><p>Constuct a path to a particular coordinate in an extent.
</p></div></div><div class="top"><p class="src"><a name="v:intersectSegExtent" class="def">intersectSegExtent</a> :: <a href="Graphics-Gloss-Data-Point.html#t:Point">Point</a> -&gt; <a href="Graphics-Gloss-Data-Point.html#t:Point">Point</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Graphics-Gloss-Data-Point.html#t:Point">Point</a><a href="src/Graphics-Gloss-Data-Extent.html#intersectSegExtent" class="link">Source</a></p><div class="doc"><p>If a line segment (P1-P2) intersects the outer edge of an extent then
   return the intersection point, that is closest to P1, if any.
   If P1 is inside the extent then <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#v:Nothing">Nothing</a></code>.
</p><pre>
                   P2
                  /
            ----/-
            | /  |
            +    |
           /------
         / 
        P1
</pre></div></div><div class="top"><p class="src"><a name="v:touchesSegExtent" class="def">touchesSegExtent</a> :: <a href="Graphics-Gloss-Data-Point.html#t:Point">Point</a> -&gt; <a href="Graphics-Gloss-Data-Point.html#t:Point">Point</a> -&gt; <a href="Graphics-Gloss-Data-Extent.html#t:Extent">Extent</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Graphics-Gloss-Data-Extent.html#touchesSegExtent" class="link">Source</a></p><div class="doc"><p>Check whether a line segment's endpoints are inside an extent, or if it
   intersects with the boundary.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>