ContentsIndex
Graphics.Plot.Display
Description
Implements functions to open windows and draw pictures in them.
Synopsis
displayInWindow :: String -> (Int, Int) -> (Int, Int) -> Picture -> IO ()
animateInWindow :: String -> (Int, Int) -> (Int, Int) -> (Float -> Picture) -> IO ()
renderInWindow :: String -> (Int, Int) -> (Int, Int) -> (IORef DisplayState -> IO ()) -> Bool -> IO ()
callbackDisplay :: IORef DisplayState -> (IORef DisplayState -> IO ()) -> IO ()
callbackReshape :: IORef DisplayState -> Size -> IO ()
Documentation
displayInWindow
:: StringName of the window.
-> (Int, Int)Initial size of the window, in pixels.
-> (Int, Int)Initial position of the window, in pixels relative to the top left corner of the screen.
-> PictureThe picture to draw.
-> IO ()
Opens a window and displays a static picture.
animateInWindow
:: StringName of the window.
-> (Int, Int)Initial size of the window, in pixels.
-> (Int, Int)Initial position of the window, in pixels relative to the top left corner of the screen.
-> (Float -> Picture)New frame function. The function is passed the current animation time, in seconds.
-> IO ()
Opens a window and displays an animation.
renderInWindow
:: StringName of the window.
-> (Int, Int)Initial size of the window, in pixels.
-> (Int, Int)Initial position of the window, in pixels relative to the top left corner of the screen.
-> (IORef DisplayState -> IO ())The function to call to draw the frame.
-> BoolWhether to animate the picture.
-> IO ()
Opens a window and calls a user supplied function to draw frames for animation. Timing and event information can be obtained from the display state which is passed to the user function at each call.
callbackDisplay
:: IORef DisplayStateThe current state.
-> (IORef DisplayState -> IO ())The user's display function.
-> IO ()
GLUT calls back on this function when it's time to draw a new frame. It sets up the render state, calls the user's display function and manages display timings.
callbackReshape
:: IORef DisplayStateThe current state.
-> SizeNew window size.
-> IO ()
GLUT calls back on this function when the window size changes. It configures the new viewport and writes the new size into the state.
Produced by Haddock version 0.7