|Maintainer||Andy Gill <email@example.com>|
Boards are the principal type for our images. The are conceptually functions from 2D coordinates to values, typically a color.
Common Boards include
Board Bool-- A masking
Board, or region.
Board (Alpha RGB)-- A
Color Boardwith alpha (transparency) values.
Board (Maybe a)-- A
Boardwith binary transparency.
Board (Maybe Color)-- A
Color Boardwith binary transparency.
Board Point-- A
Board(or field) of
- data Board a
- lookup :: Board a -> (R, R) -> a
- coord :: Board Point
- maskFor :: (Point, Point) -> Board Bool
- circularMaskFor :: Point -> R -> Board Bool
- scale :: Scale c => R -> c -> c
- scaleXY :: (R, R) -> Board a -> Board a
- move :: (R, R) -> Board a -> Board a
- rotate :: Radian -> Board a -> Board a
- crop :: Board Bool -> Board a -> Board (Maybe a)
- class Functor f => Applicative f where
The Board datatype
'''Board''' is our primary data type, an infinite flat surface (or R2 field) of values.
Board a = Point -> a.
looking up a point on the
build a circular mask or region, with a circle of radius
R, and center
Translations on a
A non-overloaded version of
scale which takes a independent x and y coordinate.
A functor with application.
Instances should satisfy the following laws:
<*>v = v
<*>w = u
- ignore left value
- ignore right value
Functor instance should satisfy
pure :: a -> f a
Lift a value.
(<*>) :: f (a -> b) -> f a -> f b
(*>) :: f a -> f b -> f b
Sequence actions, discarding the value of the first argument.
(<*) :: f a -> f b -> f a
Sequence actions, discarding the value of the second argument.