This file is indexed.

/usr/share/doc/libghc-gloss-rendering-doc/html/gloss-rendering.txt is in libghc-gloss-rendering-doc 1.10.3.3-2.

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
-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Gloss picture data types and rendering functions.
--   
--   Gloss picture data types and rendering functions. These functions
--   don't do any window management. If you want gloss to setup your window
--   as well then use the plain <tt>gloss</tt> package.
@package gloss-rendering
@version 1.10.3.3

module Graphics.Gloss.Rendering

-- | A 2D picture
data Picture

-- | A blank picture, with nothing in it.
Blank :: Picture

-- | A convex polygon filled with a solid color.
Polygon :: Path -> Picture

-- | A line along an arbitrary path.
Line :: Path -> Picture

-- | A circle with the given radius.
Circle :: Float -> Picture

-- | A circle with the given thickness and radius. If the thickness is 0
--   then this is equivalent to <a>Circle</a>.
ThickCircle :: Float -> Float -> Picture

-- | A circular arc drawn counter-clockwise between two angles (in degrees)
--   at the given radius.
Arc :: Float -> Float -> Float -> Picture

-- | 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 <a>Arc</a>.
ThickArc :: Float -> Float -> Float -> Float -> Picture

-- | Some text to draw with a vector font.
Text :: String -> Picture

-- | A bitmap image with a width, height and some 32-bit RGBA bitmap data.
--   
--   The boolean flag controls whether Gloss should cache the data in GPU
--   memory between frames. If you are programatically generating the image
--   for each frame then use <tt>False</tt>. If you have loaded it from a
--   file then use <tt>True</tt>. Setting <tt>False</tt> for static images
--   will make rendering slower than it needs to be. Setting <tt>True</tt>
--   for dynamically generated images will cause a GPU memory leak.
Bitmap :: Int -> Int -> BitmapData -> Bool -> Picture

-- | A picture drawn with this color.
Color :: Color -> Picture -> Picture

-- | A picture translated by the given x and y coordinates.
Translate :: Float -> Float -> Picture -> Picture

-- | A picture rotated clockwise by the given angle (in degrees).
Rotate :: Float -> Picture -> Picture

-- | A picture scaled by the given x and y factors.
Scale :: Float -> Float -> Picture -> Picture

-- | A picture consisting of several others.
Pictures :: [Picture] -> Picture

-- | A point on the x-y plane.
type Point = (Float, Float)

-- | A vector can be treated as a point, and vis-versa.
type Vector = Point

-- | A path through the x-y plane.
type Path = [Point]

-- | 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 <a>makeColor</a>.
data Color

-- | Make a custom color. All components are clamped to the range [0..1].
makeColor :: Float -> Float -> Float -> Float -> Color

-- | Make a custom color. All components are clamped to the range [0..255].
makeColorI :: Int -> Int -> Int -> Int -> Color

-- | Make a custom color.
--   
--   Using this function over <a>makeColor</a> 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.
--   
--   You'll only need to use this function when using the
--   <tt>gloss-raster</tt> 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.
makeRawColor :: Float -> Float -> Float -> Float -> Color

-- | Make a custom color, taking pre-clamped components.
makeRawColorI :: Int -> Int -> Int -> Int -> Color

-- | Take the RGBA components of a color.
rgbaOfColor :: Color -> (Float, Float, Float, Float)

-- | Clamp components of a raw color into the required range.
clampColor :: Color -> Color

-- | Abstract 32-bit RGBA bitmap data.
data BitmapData

-- | Description of how the bitmap is layed out in memory.
--   
--   <ul>
--   <li>Prior version of Gloss assumed `BitmapFormat BottomToTop
--   PxAGBR`</li>
--   </ul>
data BitmapFormat
BitmapFormat :: RowOrder -> PixelFormat -> BitmapFormat
[rowOrder] :: BitmapFormat -> RowOrder
[pixelFormat] :: BitmapFormat -> PixelFormat

-- | Pixel formats describe the order of the color channels in memory.
data PixelFormat
PxRGBA :: PixelFormat
PxABGR :: PixelFormat

-- | Order of rows in an image are either:
--   
--   <ul>
--   <li><a>TopToBottom</a> - the top row, followed by the next-lower row
--   and so on.</li>
--   <li><a>BottomToTop</a> - the bottom row followed by the next-higher
--   row and so on.</li>
--   </ul>
data RowOrder
TopToBottom :: RowOrder
BottomToTop :: RowOrder

-- | O(1). Use a <a>ForeignPtr</a> of RGBA data as a bitmap with the given
--   width and height.
--   
--   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 <a>False</a>. If you have loaded it from a file
--   then use <a>True</a>.
bitmapOfForeignPtr :: Int -> Int -> BitmapFormat -> ForeignPtr Word8 -> Bool -> Picture

-- | O(size). Copy a <a>ByteString</a> of RGBA data into a bitmap with the
--   given width and height.
--   
--   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 <a>False</a>. If you have loaded it from a file
--   then use <a>True</a>.
bitmapOfByteString :: Int -> Int -> BitmapFormat -> ByteString -> Bool -> Picture

-- | O(size). Copy a <a>BMP</a> file into a bitmap.
bitmapOfBMP :: BMP -> Picture

-- | Load an uncompressed 24 or 32bit RGBA BMP file as a bitmap.
loadBMP :: FilePath -> IO Picture

-- | Set up the OpenGL context, clear the buffer, and render the given
--   picture into it.
--   
--   This is the same as <a>renderPicture</a> composed with
--   <a>withModelview</a> and <a>withClearBuffer</a>. If you want to manage
--   your own OpenGL context then you can just call <a>renderPicture</a>.
--   
--   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 <tt>gloss</tt> package instead.
displayPicture :: (Int, Int) -> Color -> State -> Float -> Picture -> IO ()

-- | Render a picture into the current OpenGL context.
--   
--   Assumes that the OpenGL matrix mode is set to <tt>Modelview</tt>
renderPicture :: State -> Float -> Picture -> IO ()

-- | Set up the OpenGL rendering context for orthographic projection and
--   run an action to draw the model.
withModelview :: (Int, Int) -> IO () -> IO ()

-- | Clear the OpenGL buffer with the given background color and run an
--   action to draw the model.
withClearBuffer :: Color -> IO () -> IO ()

-- | 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 <a>State</a> each time you call
--   <tt>displayPicture</tt> or <tt>renderPicture</tt>.
initState :: IO State

-- | Abstract Gloss render state which holds references to textures loaded
--   into the GPU context.
data State