This file is indexed.

/usr/share/doc/libghc-gloss-rendering-doc/html/Graphics-Gloss-Rendering.html is in libghc-gloss-rendering-doc 1.9.3.1-3build1.

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
<!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.Rendering</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-Rendering.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Graphics-Gloss-Rendering.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-rendering-1.9.3.1: Gloss picture data types and rendering functions.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Graphics.Gloss.Rendering</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Picture data type</a></li><li><a href="#g:2">Colors</a></li><li><a href="#g:3">Bitmaps</a></li><li><a href="#g:4">Rendering</a></li></ul></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:Picture">Picture</a><ul class="subs"><li>= <a href="#v:Blank">Blank</a></li><li>| <a href="#v:Polygon">Polygon</a> <a href="Graphics-Gloss-Rendering.html#t:Path">Path</a></li><li>| <a href="#v:Line">Line</a> <a href="Graphics-Gloss-Rendering.html#t:Path">Path</a></li><li>| <a href="#v:Circle">Circle</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a></li><li>| <a href="#v:ThickCircle">ThickCircle</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a></li><li>| <a href="#v:Arc">Arc</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a></li><li>| <a href="#v:ThickArc">ThickArc</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a></li><li>| <a href="#v:Text">Text</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a></li><li>| <a href="#v:Bitmap">Bitmap</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> <a href="Graphics-Gloss-Rendering.html#t:BitmapData">BitmapData</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li>| <a href="#v:Color">Color</a> <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a> <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a></li><li>| <a href="#v:Translate">Translate</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a></li><li>| <a href="#v:Rotate">Rotate</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a></li><li>| <a href="#v:Scale">Scale</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a></li><li>| <a href="#v:Pictures">Pictures</a> [<a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a>]</li></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:Point">Point</a> = (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a>)</li><li class="src short"><span class="keyword">type</span> <a href="#t:Vector">Vector</a> = <a href="Graphics-Gloss-Rendering.html#t:Point">Point</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:Path">Path</a> = [<a href="Graphics-Gloss-Rendering.html#t:Point">Point</a>]</li><li class="src short"><span class="keyword">data</span> <a href="#t:Color">Color</a></li><li class="src short"><a href="#v:makeColor">makeColor</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> -&gt; <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a></li><li class="src short"><a href="#v:makeColorI">makeColorI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a></li><li class="src short"><a href="#v:makeRawColor">makeRawColor</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> -&gt; <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a></li><li class="src short"><a href="#v:makeRawColorI">makeRawColorI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a></li><li class="src short"><a href="#v:rgbaOfColor">rgbaOfColor</a> :: <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a>)</li><li class="src short"><a href="#v:clampColor">clampColor</a> :: <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a> -&gt; <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:BitmapData">BitmapData</a></li><li class="src short"><a href="#v:bitmapOfForeignPtr">bitmapOfForeignPtr</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Foreign-ForeignPtr.html#t:ForeignPtr">ForeignPtr</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word8">Word8</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a></li><li class="src short"><a href="#v:bitmapOfByteString">bitmapOfByteString</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a></li><li class="src short"><a href="#v:bitmapOfBMP">bitmapOfBMP</a> :: <a href="file:///usr/share/doc/libghc-bmp-doc/html/Codec-BMP.html#t:BMP">BMP</a> -&gt; <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a></li><li class="src short"><a href="#v:loadBMP">loadBMP</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a></li><li class="src short"><a href="#v:displayPicture">displayPicture</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a>) -&gt; <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a> -&gt; <a href="Graphics-Gloss-Rendering.html#t:State">State</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> -&gt; <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:renderPicture">renderPicture</a> :: <a href="Graphics-Gloss-Rendering.html#t:State">State</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> -&gt; <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:withModelview">withModelview</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a>) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:withClearBuffer">withClearBuffer</a> :: <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:initState">initState</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="Graphics-Gloss-Rendering.html#t:State">State</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:State">State</a></li></ul></div><div id="interface"><h1 id="g:1">Picture data type</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Picture" class="def">Picture</a> <a href="src/Graphics-Gloss-Internals-Data-Picture.html#Picture" class="link">Source</a></p><div class="doc"><p>A 2D picture</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Blank" class="def">Blank</a></td><td class="doc"><p>A blank picture, with nothing in it.</p></td></tr><tr><td class="src"><a name="v:Polygon" class="def">Polygon</a> <a href="Graphics-Gloss-Rendering.html#t:Path">Path</a></td><td class="doc"><p>A convex polygon filled with a solid color.</p></td></tr><tr><td class="src"><a name="v:Line" class="def">Line</a> <a href="Graphics-Gloss-Rendering.html#t:Path">Path</a></td><td class="doc"><p>A line along an arbitrary path.</p></td></tr><tr><td class="src"><a name="v:Circle" class="def">Circle</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a></td><td class="doc"><p>A circle with the given radius.</p></td></tr><tr><td class="src"><a name="v:ThickCircle" class="def">ThickCircle</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a></td><td class="doc"><p>A circle with the given thickness and radius.
   If the thickness is 0 then this is equivalent to <code><a href="Graphics-Gloss-Rendering.html#v:Circle">Circle</a></code>.</p></td></tr><tr><td class="src"><a name="v:Arc" class="def">Arc</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a></td><td class="doc"><p>A circular arc drawn counter-clockwise between two angles 
  (in degrees) at the given radius.</p></td></tr><tr><td class="src"><a name="v:ThickArc" class="def">ThickArc</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a></td><td class="doc"><p>A circular arc drawn counter-clockwise between two angles 
  (in degrees), with the given radius  and thickness.
   If the thickness is 0 then this is equivalent to <code><a href="Graphics-Gloss-Rendering.html#v:Arc">Arc</a></code>.</p></td></tr><tr><td class="src"><a name="v:Text" class="def">Text</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a></td><td class="doc"><p>Some text to draw with a vector font.</p></td></tr><tr><td class="src"><a name="v:Bitmap" class="def">Bitmap</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> <a href="Graphics-Gloss-Rendering.html#t:BitmapData">BitmapData</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>A bitmap image with a width, height and some 32-bit RGBA
   bitmap data.</p><p>The boolean flag controls whether Gloss should cache the data
  between frames for speed. If you are programatically generating
  the image for each frame then use <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:False">False</a></code>. If you have loaded it
  from a file then use <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:True">True</a></code>.</p></td></tr><tr><td class="src"><a name="v:Color" class="def">Color</a> <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a> <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a></td><td class="doc"><p>A picture drawn with this color.</p></td></tr><tr><td class="src"><a name="v:Translate" class="def">Translate</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a></td><td class="doc"><p>A picture translated by the given x and y coordinates.</p></td></tr><tr><td class="src"><a name="v:Rotate" class="def">Rotate</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a></td><td class="doc"><p>A picture rotated clockwise by the given angle (in degrees).</p></td></tr><tr><td class="src"><a name="v:Scale" class="def">Scale</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a></td><td class="doc"><p>A picture scaled by the given x and y factors.</p></td></tr><tr><td class="src"><a name="v:Pictures" class="def">Pictures</a> [<a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a>]</td><td class="doc"><p>A picture consisting of several others.</p></td></tr></table></div><div class="subs instances"><p id="control.i:Picture" class="caption collapser" onclick="toggleSection('i:Picture')">Instances</p><div id="section.i:Picture" 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/Data-Eq.html#t:Eq">Eq</a> <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a></span> <a href="src/Graphics-Gloss-Internals-Data-Picture.html#line-120" 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/ghc-doc/html/libraries/base-4.8.2.0/Data-Data.html#t:Data">Data</a> <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a></span> <a href="src/Graphics-Gloss-Internals-Data-Picture.html#line-120" 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/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a></span> <a href="src/Graphics-Gloss-Internals-Data-Picture.html#line-120" 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/ghc-doc/html/libraries/base-4.8.2.0/Data-Monoid.html#t:Monoid">Monoid</a> <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a></span> <a href="src/Graphics-Gloss-Internals-Data-Picture.html#line-124" class="link">Source</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:Point" class="def">Point</a> = (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a>) <a href="src/Graphics-Gloss-Internals-Data-Picture.html#Point" class="link">Source</a></p><div class="doc"><p>A point on the x-y plane.</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Vector" class="def">Vector</a> = <a href="Graphics-Gloss-Rendering.html#t:Point">Point</a> <a href="src/Graphics-Gloss-Internals-Data-Picture.html#Vector" class="link">Source</a></p><div class="doc"><p>A vector can be treated as a point, and vis-versa.</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Path" class="def">Path</a> = [<a href="Graphics-Gloss-Rendering.html#t:Point">Point</a>] <a href="src/Graphics-Gloss-Internals-Data-Picture.html#Path" class="link">Source</a></p><div class="doc"><p>A path through the x-y plane.</p></div></div><h1 id="g:2">Colors</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Color" class="def">Color</a> <a href="src/Graphics-Gloss-Internals-Data-Color.html#Color" class="link">Source</a></p><div class="doc"><p>An abstract color value.
      We keep the type abstract so we can be sure that the components
      are in the required range. To make a custom color use <code><a href="Graphics-Gloss-Rendering.html#v:makeColor">makeColor</a></code>.</p></div><div class="subs instances"><p id="control.i:Color" class="caption collapser" onclick="toggleSection('i:Color')">Instances</p><div id="section.i:Color" 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/Data-Eq.html#t:Eq">Eq</a> <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a></span> <a href="src/Graphics-Gloss-Internals-Data-Color.html#line-22" 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/ghc-doc/html/libraries/base-4.8.2.0/Data-Data.html#t:Data">Data</a> <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a></span> <a href="src/Graphics-Gloss-Internals-Data-Color.html#line-22" 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/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Num">Num</a> <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a></span> <a href="src/Graphics-Gloss-Internals-Data-Color.html#line-25" 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/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a></span> <a href="src/Graphics-Gloss-Internals-Data-Color.html#line-22" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:makeColor" class="def">makeColor</a> <a href="src/Graphics-Gloss-Internals-Data-Color.html#makeColor" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a></td><td class="doc"><p>Red component.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a></td><td class="doc"><p>Green component.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a></td><td class="doc"><p>Blue component.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a></td><td class="doc"><p>Alpha component.</p></td></tr><tr><td class="src">-&gt; <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Make a custom color. All components are clamped to the range  [0..1].</p></div></div><div class="top"><p class="src"><a name="v:makeColorI" class="def">makeColorI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a> <a href="src/Graphics-Gloss-Internals-Data-Color.html#makeColorI" class="link">Source</a></p><div class="doc"><p>Make a custom color. All components are clamped to the range [0..255].</p></div></div><div class="top"><p class="src"><a name="v:makeRawColor" class="def">makeRawColor</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a> -&gt; <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a> <a href="src/Graphics-Gloss-Internals-Data-Color.html#makeRawColor" class="link">Source</a></p><div class="doc"><p>Make a custom color. </p><p>Using this function over <code><a href="Graphics-Gloss-Rendering.html#v:makeColor">makeColor</a></code> avoids clamping the components,
   which saves time. However, if the components are out of range then
   this will result in integer overflow at rendering time, and the actual
   picture you get will be implementation dependent. </p><p>You'll only need to use this function when using the <code>gloss-raster</code>
   package that builds a new color for every pixel. If you're just working
   with the Picture data type then it there is no need for raw colors.</p></div></div><div class="top"><p class="src"><a name="v:makeRawColorI" class="def">makeRawColorI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a> <a href="src/Graphics-Gloss-Internals-Data-Color.html#makeRawColorI" class="link">Source</a></p><div class="doc"><p>Make a custom color, taking pre-clamped components.</p></div></div><div class="top"><p class="src"><a name="v:rgbaOfColor" class="def">rgbaOfColor</a> :: <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a>) <a href="src/Graphics-Gloss-Internals-Data-Color.html#rgbaOfColor" class="link">Source</a></p><div class="doc"><p>Take the RGBA components of a color.</p></div></div><div class="top"><p class="src"><a name="v:clampColor" class="def">clampColor</a> :: <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a> -&gt; <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a> <a href="src/Graphics-Gloss-Internals-Data-Color.html#clampColor" class="link">Source</a></p><div class="doc"><p>Clamp components of a raw color into the required range.</p></div></div><h1 id="g:3">Bitmaps</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:BitmapData" class="def">BitmapData</a> <a href="src/Graphics-Gloss-Internals-Rendering-Bitmap.html#BitmapData" class="link">Source</a></p><div class="doc"><p>Abstract 32-bit RGBA bitmap data.</p></div><div class="subs instances"><p id="control.i:BitmapData" class="caption collapser" onclick="toggleSection('i:BitmapData')">Instances</p><div id="section.i:BitmapData" 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/Data-Eq.html#t:Eq">Eq</a> <a href="Graphics-Gloss-Rendering.html#t:BitmapData">BitmapData</a></span> <a href="src/Graphics-Gloss-Internals-Rendering-Bitmap.html#line-20" 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/ghc-doc/html/libraries/base-4.8.2.0/Data-Data.html#t:Data">Data</a> <a href="Graphics-Gloss-Rendering.html#t:BitmapData">BitmapData</a></span> <a href="src/Graphics-Gloss-Internals-Rendering-Bitmap.html#line-20" 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/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="Graphics-Gloss-Rendering.html#t:BitmapData">BitmapData</a></span> <a href="src/Graphics-Gloss-Internals-Rendering-Bitmap.html#line-23" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:bitmapOfForeignPtr" class="def">bitmapOfForeignPtr</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Foreign-ForeignPtr.html#t:ForeignPtr">ForeignPtr</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word8">Word8</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a> <a href="src/Graphics-Gloss-Internals-Data-Picture.html#bitmapOfForeignPtr" class="link">Source</a></p><div class="doc"><p>O(1). Use a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Foreign-ForeignPtr.html#t:ForeignPtr">ForeignPtr</a></code> of RGBA data as a bitmap with the given
   width and height.</p></div></div><div class="top"><p class="src"><a name="v:bitmapOfByteString" class="def">bitmapOfByteString</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a> <a href="src/Graphics-Gloss-Internals-Data-Picture.html#bitmapOfByteString" class="link">Source</a></p><div class="doc"><p>O(size). Copy a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></code> of RGBA data into a bitmap with the given
   width and height.</p><p>The boolean flag controls whether Gloss should cache the data
   between frames for speed. If you are programatically generating
   the image for each frame then use <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:False">False</a></code>. If you have loaded it
   from a file then use <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:True">True</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:bitmapOfBMP" class="def">bitmapOfBMP</a> :: <a href="file:///usr/share/doc/libghc-bmp-doc/html/Codec-BMP.html#t:BMP">BMP</a> -&gt; <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a> <a href="src/Graphics-Gloss-Internals-Data-Picture.html#bitmapOfBMP" class="link">Source</a></p><div class="doc"><p>O(size). Copy a <code><a href="file:///usr/share/doc/libghc-bmp-doc/html/Codec-BMP.html#t:BMP">BMP</a></code> file into a bitmap.</p></div></div><div class="top"><p class="src"><a name="v:loadBMP" class="def">loadBMP</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a> <a href="src/Graphics-Gloss-Internals-Data-Picture.html#loadBMP" class="link">Source</a></p><div class="doc"><p>Load an uncompressed 24 or 32bit RGBA BMP file as a bitmap.</p></div></div><h1 id="g:4">Rendering</h1><div class="top"><p class="src"><a name="v:displayPicture" class="def">displayPicture</a> <a href="src/Graphics-Gloss-Rendering.html#displayPicture" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a>)</td><td class="doc"><p>Window width and height.</p></td></tr><tr><td class="src">-&gt; <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a></td><td class="doc"><p>Color to clear the window with.</p></td></tr><tr><td class="src">-&gt; <a href="Graphics-Gloss-Rendering.html#t:State">State</a></td><td class="doc"><p>Current rendering state.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a></td><td class="doc"><p>View port scale, which controls the level of detail.
   Use 1.0 to start with.</p></td></tr><tr><td class="src">-&gt; <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a></td><td class="doc"><p>Picture to draw.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Set up the OpenGL context, clear the buffer, and render the given picture
   into it. </p><p>This is the same as <code><a href="Graphics-Gloss-Rendering.html#v:renderPicture">renderPicture</a></code> composed with <code><a href="Graphics-Gloss-Rendering.html#v:withModelview">withModelview</a></code>
   and <code><a href="Graphics-Gloss-Rendering.html#v:withClearBuffer">withClearBuffer</a></code>. If you want to manage your own OpenGL context then
   you can just call <code><a href="Graphics-Gloss-Rendering.html#v:renderPicture">renderPicture</a></code>. </p><p>Using this function assumes that you've already opened a window
   and set that to the active context. If you don't want to do your own window
   management then use the <code>gloss</code> package instead.</p></div></div><div class="top"><p class="src"><a name="v:renderPicture" class="def">renderPicture</a> <a href="src/Graphics-Gloss-Internals-Rendering-Picture.html#renderPicture" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-Gloss-Rendering.html#t:State">State</a></td><td class="doc"><p>Current rendering state.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a></td><td class="doc"><p>View port scale, which controls the level of detail.
   Use 1.0 to start with.</p></td></tr><tr><td class="src">-&gt; <a href="Graphics-Gloss-Rendering.html#t:Picture">Picture</a></td><td class="doc"><p>Picture to render.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Render a picture into the current OpenGL context.</p><p>Assumes that the OpenGL matrix mode is set to <code>Modelview</code></p></div></div><div class="top"><p class="src"><a name="v:withModelview" class="def">withModelview</a> <a href="src/Graphics-Gloss-Internals-Rendering-Common.html#withModelview" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a>)</td><td class="doc"><p>Width and height of window.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc"><p>Action to perform.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Set up the OpenGL rendering context for orthographic projection and run an
   action to draw the model.</p></div></div><div class="top"><p class="src"><a name="v:withClearBuffer" class="def">withClearBuffer</a> <a href="src/Graphics-Gloss-Internals-Rendering-Common.html#withClearBuffer" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-Gloss-Rendering.html#t:Color">Color</a></td><td class="doc"><p>Background color</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc"><p>Action to perform</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Clear the OpenGL buffer with the given background color and run 
   an action to draw the model.</p></div></div><div class="top"><p class="src"><a name="v:initState" class="def">initState</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="Graphics-Gloss-Rendering.html#t:State">State</a> <a href="src/Graphics-Gloss-Internals-Rendering-State.html#initState" class="link">Source</a></p><div class="doc"><p>A mutable render state holds references to the textures currently loaded
   into the OpenGL context. To ensure that textures are cached in GPU memory,
   pass the same <code><a href="Graphics-Gloss-Rendering.html#t:State">State</a></code> each time you call <code>displayPicture</code> or <code>renderPicture</code>.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:State" class="def">State</a> <a href="src/Graphics-Gloss-Internals-Rendering-State.html#State" class="link">Source</a></p><div class="doc"><p>Render options settings</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>