úÎ&üt”      !"#$%&'()*+,-./012 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ ‰ Š ‹ Œ  Ž   ‘ ’ “  None+!Abstract 32-bit RGBA bitmap data.”6Generates the point path to display the bitmap centred•{Destructively reverse the byte order in an array. This is necessary as OpenGL reads pixel data as ABGR, rather than RGBA–2Destructively reverses the byte order in an array.—AFrees the allocated memory given to OpenGL to avoid a memory leak˜AThese functions work as bit masks to isolate the Word8 components ™”•–—˜š›œ™”•— ™”•–—˜š›œ Safe-Inferred+&Represents a Quadrant in the 2D plane. South East South West North East North West!A list of all quadrants. Same as  [NW .. SE]. Safe-Inferred+.Describes how Gloss should display its output.:Display full screen with a drawing area of the given size. ;Display in a window with the given name, size and position.     Safe-Inferred+24 ;A point on the x-y plane. Points can also be treated as Vectors, so Graphics.Gloss.Data.Vector may also be useful. łTest whether a point lies within a rectangular box that is oriented on the x-y plane. The points P1-P2 are opposing points of the box, but need not be in a particular order. S P2 +-------+ | | | + P0 | | | +-------+ P1 ž˙Pretend a point is a number. Vectors aren't real numbes according to Haskell, because they don't support the multiply and divide field operators. We can pretend they are though, and use the (+) and (-) operators as component-wise addition and subtraction. ž   ž Safe-Inferred+ Convert degrees to radians Convert radians to degrees3Normalise an angle to be between 0 and 2*pi radians     Safe-Inferred+2 2A vector can be treated as a point, and vis-versa.The magnitude of a vector.5The angle of this vector, relative to the +ve x-axis.The dot product of two vectors.The determinant of two vectors.Multiply a vector by a scalar.IRotate a vector by an angle (in radians). +ve angle is counter-clockwise.9Compute the inner angle (in radians) between two vectors./Normalise a vector, so it has a magnitude of 1.eProduce a unit vector at a given angle relative to the +ve x-axis. The provided angle is in radians.     Safe-Inferred+ LCheck if line segment (P1-P2) clears a box (P3-P4) by being well outside it.(Given an infinite line which intersects P1 and P14, return the point on that line that is closest to P3jGiven an infinite line which intersects P1 and P2, let P4 be the point on the line that is closest to P3.FReturn an indication of where on the line P4 is relative to P1 and P2. a if P4 == P1 then 0 if P4 == P2 then 1 if P4 is halfway between P1 and P2 then 0.5 M | P1 | P4 +---- P3 | P2 | ŢGiven four points specifying two lines, get the point where the two lines cross, if any. Note that the lines extend off to infinity, so the intersection point might not line between either of the two pairs of points. N \ / P1 P4 \ / + / \ P3 P2 / \ Get the point where a segment P1-P2 crosses an infinite line P3-P4 , if any.@Get the point where a segment crosses a horizontal line, if any. a + P1 / -------+--------- / y0 P2 + >Get the point where a segment crosses a vertical line, if any. u | | + P1 | / + / | P2 + | | x0 Get the point where a segment P1-P2 crosses another segement P3-P4 , if any.!>Check if an arbitrary segment intersects a horizontal segment. a + P2 / (xa, y3) +---+----+ (xb, y3) / P1 + "<Check if an arbitrary segment intersects a vertical segment. ‚ (x3, yb) + | + P1 | / + / | P2 + | + (x3, ya) P1 First point of segment. P2 Second point of segment.P3 Lower left point of box.P4 Upper right point of box.P1P2P3/the point on the line P1-P2 that is closest to P3P1P2P3P1P2P3P4P1P2P3P4P1 First point of segment.P2 Second point of segment.y value of line.P1 First point of segment.P2 Second point of segment.x value of line. P1P2P3P4!P1 First point of segment.P2 Second point of segment.#(y3) y value of horizontal segment.,(xa) Leftmost x value of horizontal segment.-(xb) Rightmost x value of horizontal segment.$(x3, y3) Intersection point, if any."P1 First point of segment.P2 Second point of segment. (x3) x value of vertical segment((ya) Lowest y value of vertical segment.)(yb) Highest y value of vertical segment.$(x3, y3) Intersection point, if any.  !"  !"  !" Safe-Inferred+#An integral coordinate.$yA rectangular area of the 2D plane. We keep the type abstract to ensure that invalid extents cannot be constructed.%MConstruct an extent. The north value must be > south, and east > west, else Ÿ.&&Take the NSEW components of an extent.' A square extent of a given size.(&Get the width and height of an extent.)<Check if an extent is a square with a width and height of 1.*1Check whether a coordinate lies inside an extent.+,Check whether a point lies inside an extent.,8Get the coordinate that lies at the center of an extent.-"Cut one quadrant out of an extent..6Get the quadrant that this coordinate lies in, if any./8Constuct a path to a particular coordinate in an extent.0Ş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  . ‡ P2 / ----/- | / | + | /------ / P1 1hCheck whether a line segment's endpoints are inside an extent, or if it intersects with the boundary.#$Ą% y max (north) y min (south) x max (east) x min (west)&'()*+,-./01#$%&'()*+,-./01$#%&'()*+,-./01#$Ą%&'()*+,-./01  Safe-Inferred+HM2The quad tree structure.3A node with four children.4A leaf containint some value.5An empty node.6A 5 tree.7 A node with 5. for all its branches.8LGet a quadrant from a node. If the tree does not have an outer node then  .9sApply a function to a quadrant of a node. If the tree does not have an outer node then return the original tree.:dInsert a value into the tree at the position given by a path. If the path intersects an existing 4 then return the original tree.;{Insert a value into the node containing this coordinate. The node is created at maximum depth, corresponding to an unit $.<$Lookup a node based on a path to it.=+Lookup an element based given a path to it.>=Lookup a node if a tree given a coordinate which it contains.?IFlatten a QuadTree into a list of its contained values, with coordinates.@IFlatten a QuadTree into a list of its contained values, with coordinates.23456789:;<=>"Extent that covers the whole tree.$Coordinate of the value of interest.?"Extent that covers the whole tree.@"Extent that covers the whole tree.23456789:;<=>?@25436789:;<=>?@ 25436789:;<=>?@ Safe-Inferred+  !"  Safe-Inferred+A‘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 B.˘BHolds the color components. All components lie in the range [0..1.BEMake a custom color. All components are clamped to the range [0..1].CXMake a custom color. You promise that all components are clamped to the range [0..1]DFMake a custom color. All components are clamped to the range [0..255].E$Take the RGBA components of a color.FYMake a custom color. Components should be in the range [0..1] but this is not checked.Ł4Clamp components of a color into the required range.¤<Normalise a color to the value of its largest RGB component.G%Mix two colors with the given ratios.HƒAdd RGB components of a color component-wise, then normalise them to the highest resulting one. The alpha components are averaged.I8Make a dimmer version of a color, scaling towards black.J:Make a brighter version of a color, scaling towards white.KLighten a color, adding white.LDarken a color, adding black.M A greyness of a given magnitude.A˘BRed component.Green component.Blue component.Alpha component.CDRed component.Green component.Blue component.Alpha component.EFRed component.Green component.Blue component.Alpha component.٤GRatio of first color.Ratio of second color. First color. Second color.Resulting color.HIJKLM!Range is 0 = black, to 1 = white.NOPQRSTUVWXYZ[ĽABCDEFGHIJKLMNOPQRSTUVWXYZ[ABCDFEGHIJKLMNOPQRSTUVWXYZ[A˘BCDEF٤GHIJKLMNOPQRSTUVWXYZ[ĽNone+,\ A 2D picture]'A picture consisting of several others.^.A picture scaled by the given x and y factors._<A picture rotated clockwise by the given angle (in degrees).`6A picture translated by the given x and y coordinates.a A picture drawn with this color.bHA bitmap image with a width, height and some 32-bit RGBA bitmap data.¤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 Ś/. If you have loaded it from a file then use §.c%Some text to draw with a vector font.dĽ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 e.e^A circular arc drawn counter-clockwise between two angles (in degrees) at the given radius.fbA circle with the given thickness and radius. If the thickness is 0 then this is equivalent to g.gA circle with the given radius.hA line along an arbitrary path.i+A convex polygon filled with a solid color.j$A blank picture, with nothing in it.kA path through the x-y plane.l$A blank picture, with nothing in it.m+A convex polygon filled with a solid color.nA line along an arbitrary path.oA circle with the given radius.pbA circle with the given thickness and radius. If the thickness is 0 then this is equivalent to g.q_A circular arc drawn counter-clockwise between two angles (in degrees) at the given radius.rĽ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 e.s%Some text to draw with a vector font.tYA bitmap image with a width, height and a Vector holding the 32-bit RGBA bitmap data.Ś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 Ś1. If you have loaded it from a file then use §.u A picture drawn with this color.v6A picture translated by the given x and y coordinates.w<A picture rotated clockwise by the given angle (in degrees).x.A picture scaled by the given x and y factors.y'A picture consisting of several others.z O(1). Use a ¨= of RGBA data as a bitmap with the given width and height.{O(size). Copy 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 Ś0. If you have loaded it from a file then use §.|O(size). Copy a Ş file into a bitmap.};Load an uncompressed 24 or 32bit RGBA BMP file as a bitmap.~A closed loop along a path.%A solid circle with the given radius.€LA solid arc, drawn counter-clockwise between two angles at the given radius.ˇA wireframe sector of a circle. An arc is draw counter-clockwise from the first to the second angle at the given radius. Lines are drawn from the origin to the ends of the arc.‚9A path representing a rectangle centered about the originƒ0A wireframe rectangle centered about the origin.„9A wireframe rectangle in the y > 0 half of the x-y plane.…CA path representing a rectangle in the y > 0 half of the x-y plane.†,A solid rectangle centered about the origin.‡5A solid rectangle in the y > 0 half of the x-y plane.-\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚width of rectangleheight of rectangleƒ„…†‡Ť/ \]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡/ k\jihgfedcba`_^]lmnopqrstuvwxy~€‚ƒ†…„‡z{|}\jihgfedcba`_^]klmnopqrstuvwxyz{|}~€‚ƒ„…†‡Ť None+ˆThe ˆ– represents the global transformation applied to the displayed picture. When the user pans, zooms, or rotates the display then this changes the ˆ.ŠGlobal translation.‹Global rotation (in degrees).Œ-Global scaling (of both x and y coordinates)."The initial state of the viewport.Ž:Translates, rotates, and scales an image according to the ˆ.5Takes a point using screen coordinates, and uses the ˆA to convert it to Picture coordinates. This is the inverse of Ž for points.ˆ‰Š‹ŒŽˆ‰Š‹ŒŽˆ‰Š‹ŒŽˆ‰Š‹ŒŽNone+Ź$A texture that we've sent to OpenGL.­Stable name derived from the  that the user gives us.ŽWidth of the image, in pixels.ŻHeight of the image, in pixels.° Pointer to the Raw texture data.ąThe OpenGL texture object.˛FWhether we want to leave this in OpenGL texture memory between frames.łRender options settings´Whether to use colorľ$Whether to force wireframe mode onlyśWhether to use alpha blendingˇWhether to use line smoothing¸,Cache of Textures that we've sent to OpenGL.\The render state holds references to the textures currently cached in the OpenGL context.Źš­ŽŻ°ą˛łş´ľśˇ¸Źš­ŽŻ°ą˛łş´ľśˇ¸Źš­ŽŻ°ą˛łş´ľśˇ¸None+ť5Convert one of our Colors to OpenGL's representation.ťťťNone+źŒThe OpenGL library doesn't seem to provide a nice way convert a Float to a GLfloat, even though they're the same thing under the covers. MUsing realToFrac is too slow, as it doesn't get fused in at least GHC 6.12.1˝!Used for similar reasons to above‘6Perform an OpenGL rendering action in the appropriate  ModelView context.ź˝‘Width and height of window.Action to perform.ź˝‘ź˝‘None+;ž˙Decide how many line segments to use to render the circle. The number of segments we should use to get a nice picture depends on the size of the circle on the screen, not its intrinsic radius. If the viewport has been zoomed-in then we need to use more segments.ż(Render a circle with the given thicknessŔRender a circle as a line.Á:Render a circle with a given thickness as a triangle stripÂ'Render an arc with the given thickness.ĂRender an arc as a line.Ä8Render an arc with a given thickness as a triangle strip žżŔÁÂĂÄĹĆÇȿ žżŔÁÂĂÄĹĆÇČNone+234M’;Render a picture using the given render state and viewport.ɃLoad a texture. If we've seen it before then use the pre-installed one from the texture cache, otherwise load it into OpenGL.ĘInstall a texture into OpenGL.Ë"If this texture does not have its cacheMe= flag set then delete it from OpenGL and free the memory.ĚTurn alpha blending on or offÍTurn line smoothing on or off ’Current rendering state.Current viewport.Picture to render.ÎĎĐÉĘËĚÍŃ’ ’ÎĎĐÉĘËĚÍŃ None+“ÜClear the current OpenGL context and draw the given picture into it. The mutable state holds references to the textures currently loaded into the context, and may have new ones added to it when drawing the picture.“Current rendering state.Window width and height.Color to clear the window with.Picture to draw.‘’““‘’“Ň  !"#$%&'()*+,-./0123456789:;<=>?@ABCDE F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n opqrstUuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š › › œ  ž Ÿ   Ą˘Ł¤ Ľ Ś § ¨ Š Ş  Ť Ź ­ ŽŻ°ą˛°ł´8 ľ ś ˇ ¸šşťšşź°˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇĆÍÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęgloss-rendering-1.9.1.1Graphics.Gloss.Data.PictureGraphics.Gloss.Data.QuadGraphics.Gloss.Data.DisplayGraphics.Gloss.Data.PointGraphics.Gloss.Geometry.AngleGraphics.Gloss.Data.VectorGraphics.Gloss.Geometry.LineGraphics.Gloss.Data.ExtentGraphics.Gloss.Data.QuadTreeGraphics.Gloss.Data.ColorGraphics.Gloss.Data.ViewPortGraphics.Gloss.Render&Graphics.Gloss.Internals.Render.BitmapGraphics.Gloss.Geometry%Graphics.Gloss.Internals.Render.StateGraphics.Gloss.Internals.Color&Graphics.Gloss.Internals.Render.Common&Graphics.Gloss.Internals.Render.Circle'Graphics.Gloss.Internals.Render.Picture BitmapDataQuadSESWNENWallQuadsDisplay FullScreenInWindowPoint pointInBoxdegToRadradToDegnormaliseAngleVectormagVargVdotVdetVmulSVrotateVangleVV normaliseVunitVectorAtAngle segClearsBoxclosestPointOnLineclosestPointOnLineParamintersectLineLineintersectSegLineintersectSegHorzLineintersectSegVertLineintersectSegSegintersectSegHorzSegintersectSegVertSegCoordExtent makeExtent takeExtent squareExtent sizeOfExtent isUnitExtent coordInExtent pointInExtentcenterCoordOfExtentcutQuadOfExtent quadOfCoord pathToCoordintersectSegExtenttouchesSegExtentQuadTreeTNodeTLeafTNil emptyTree emptyNodetakeQuadOfTree liftToQuad insertByPath insertByCoordlookupNodeByPath lookupByPath lookupByCoordflattenQuadTreeflattenQuadTreeWithExtentsColor makeColor makeColor' makeColor8 rgbaOfColorrawColor mixColors addColorsdimbrightlightdarkgreyNblackwhiteredgreenblueyellowcyanmagentarosevioletazure aquamarine chartreuseorangePicturePicturesScaleRotate TranslateBitmapTextThickArcArc ThickCircleCircleLinePolygonBlankPathblankpolygonlinecircle thickCirclearcthickArctextbitmapcolor translaterotatescalepicturesbitmapOfForeignPtrbitmapOfByteString bitmapOfBMPloadBMPlineLoop circleSolidarcSolid sectorWire rectanglePath rectangleWirerectangleUpperWirerectangleUpperPathrectangleSolidrectangleUpperSolidViewPortviewPortTranslateviewPortRotate viewPortScale viewPortInitapplyViewPortToPictureinvertViewPort stateInit renderAction renderPicturerender bitmapPath reverseRGBAreverseRGBA_ptrfreeBitmapData isolateByte0 isolateByte1 isolateByte2 isolateByte3$fShowBitmapData$fNum(,)baseGHC.Errerror Data.MaybeNothingRGBA clampColornormaliseColor $fNumColorghc-prim GHC.TypesFalseTrueGHC.ForeignPtr ForeignPtrbytestring-0.10.4.0Data.ByteString.Internal ByteString bmp-1.2.5.2Codec.BMP.BaseBMP$fMonoidPictureTexturetexNametexWidth texHeighttexData texObject texCacheMeState stateColorstateWireframestateBlendAlphastateLineSmooth stateTexturesglColor4OfColorgfgsizei circleSteps renderCirclerenderCircleLinerenderCircleStrip renderArc renderArcLinerenderArcStriprenderCircleLine_steprenderCircleStrip_stepaddPointaddPointOnCircle loadTextureinstallTexture freeTexture setBlendAlpha setLineSmooth drawPicture checkErrors handleError vertexPFs