module GridBounds.Transform
( transform
, transformList
, createGrid
, createCompressedGrid
) where
import GridBounds.Bounds (Bounds)
import qualified GridBounds.Bounds as B
import qualified GridBox.Coordinate as Coordinate
import GridBox.Box (Box)
import GridBox.Compress (CompressedGrid, compressRow)
transform :: (Double, Double) -> Double -> Bounds -> Bounds
transform position scale bounds=
map (Coordinate.transform position scale) bounds
transformList :: [Bounds] -> (Double, Double) -> Double -> [Bounds]
transformList bounds position scale =
map (transform position scale) bounds
createGrid :: [Bounds] -> (Double, Double) -> Double -> (Double, Double) -> Double -> Double -> Double -> Double -> [Box]
createGrid bounds position scale =
B.createGrid (transformList bounds position scale)
createCompressedGrid :: [Bounds] -> (Double, Double) -> Double -> (Double, Double) -> Double -> Double -> Double -> Double -> CompressedGrid
createCompressedGrid bounds position scale size width height xOffset yOffset =
compressRow $ createGrid bounds position scale size width height xOffset yOffset