-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A grid box model -- -- Spans a 2D grid of n rows and m boxes with equal size. @package gridbox @version 0.0.0.1 -- | Box in a row module GridBox.Box -- | A grid box with position (x,y) at row and col with size. data Box Box :: Double -> Double -> BoxRow -> BoxCol -> Double -> Double -> Box [x] :: Box -> Double [y] :: Box -> Double [row] :: Box -> BoxRow [col] :: Box -> BoxCol [width] :: Box -> Double [height] :: Box -> Double -- | Row of a box type BoxRow = Int -- | Col of a box type BoxCol = Int -- | Create a box with position (x,y) at row and col with given size. makeBox :: Double -> Double -> Int -> Int -> (Double, Double) -> Box -- | Create a List of (x,y) with given size. makeVectors :: Box -> [(Double, Double)] -- | Convert from box to (row, col) fromBox :: Box -> (BoxRow, BoxCol) instance GHC.Classes.Eq GridBox.Box.Box instance GHC.Show.Show GridBox.Box.Box instance GHC.Read.Read GridBox.Box.Box -- | Row of a grid module GridBox.Row -- | A row of boxes. type Row = [Box] -- | Get the x-position for given row, size and x-offset. getBoxPositionX :: Int -> Double -> Double -> Double -- | Get the y-position for given col, size and y-offset. getBoxPositionY :: Int -> Double -> Double -> Double -- | Create a box with given row, col, size, x- and y-offset. createBox :: (Double, Double) -> Double -> Double -> Int -> Int -> Box -- | Create a row with given row, List of col-indexes, size, x- and -- y-offset. makeRow :: (Double, Double) -> Double -> Double -> [Int] -> Int -> Row -- | Get the given position with x-offset. topX :: Double -> Double -> Double -- | Get the given position with y-offset. topY :: Double -> Double -> Double -- | Grid of rows module GridBox.Grid -- | A grid of rows. type Grid = [Row] -- | Create a grid with given size width, height, x- and y-offset. createGrid :: (Double, Double) -> Double -> Double -> Double -> Double -> Grid -- | Create a grid with given List of row- and col-indexes, size, x- and -- y-offset. makeGrid :: [Int] -> [Int] -> (Double, Double) -> Double -> Double -> Grid