gridbox-0.1.0.1: A grid box model

Safe HaskellSafe
LanguageHaskell2010

GridBox.Box

Description

Box in a row

Synopsis

Documentation

data Box Source #

A grid box with position (x,y) at row and col with size.

Constructors

Box 

Fields

Instances

type BoxRow = Int Source #

Row of a box

type BoxCol = Int Source #

Col of a box

type BoxPosition = (BoxRow, BoxCol) Source #

Box position

type BoxPositions = [BoxPosition] Source #

Box positions

makeBox :: Double -> Double -> Int -> Int -> (Double, Double) -> Box Source #

Create a box with position (x,y) at row and col with given size.

makeVectors :: Box -> [(Double, Double)] Source #

Create a List of (x,y) with given size.

fromBox :: Box -> BoxPosition Source #

Convert from Box to (row, col)

fromBoxes :: [Box] -> BoxPositions Source #

Convert all boxes in list from Box to (row, col)