Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Tile
- rasterize :: Int -> Int -> Tile -> Compose ZipList ZipList Color
- rasterize' :: Int -> Int -> Tile -> [[Color]]
- toImage :: Int -> Int -> Tile -> Image PixelRGBA8
- empty :: Tile
- color :: Double -> Double -> Double -> Double -> Tile
- cw :: Tile -> Tile
- ccw :: Tile -> Tile
- flipH :: Tile -> Tile
- flipV :: Tile -> Tile
- beside :: Tile -> Tile -> Tile
- rows :: [Tile] -> Tile
- above :: Tile -> Tile -> Tile
- cols :: [Tile] -> Tile
- behind :: Tile -> Tile -> Tile
- quad :: Tile -> Tile -> Tile -> Tile -> Tile
- swirl :: Tile -> Tile
- nona :: Tile -> Tile -> Tile -> Tile
- haskell :: Tile
- sandy :: Tile
- type Color = PixelRGBA8
- redChannel :: Color -> Double
- greenChannel :: Color -> Double
- blueChannel :: Color -> Double
- alphaChannel :: Color -> Double
- pattern Color :: Double -> Double -> Double -> Double -> Color
- invert :: Color -> Color
- mask :: Color -> Color -> Color
- over :: Color -> Color -> Color
Tiles and their observations
:: Int | resulting width |
-> Int | resulting heigeht |
-> Tile | |
-> Compose ZipList ZipList Color | the resulting "pixels" in row-major order |
Rasterize a Tile
down into a row-major representation of its constituent
"pixels". For a version that emits a list of lists directly, see rasterize'
.
:: Int | resulting width |
-> Int | resulting heigeht |
-> Tile | |
-> [[Color]] | the resulting "pixels" in row-major order |
Like rasterize
, but with a more convenient output type.
:: Int | resulting width |
-> Int | resulting height |
-> Tile | |
-> Image PixelRGBA8 |
Like rasterize
, but into a format that can be directly saved to disk as
an image.
Tile constructors
quad :: Tile -> Tile -> Tile -> Tile -> Tile Source #
Place four Tile
s in the four quadrants. The first argument is the
top-left; the second is the top-right; third: bottom left; fourth: bottom
right.
Special tiles
Colors and their observations
type Color = PixelRGBA8 Source #
Color constructors
invert :: Color -> Color Source #
Inverts a Color
by negating each of its color channels, but leaving the
alpha alone.
Orphan instances
Semigroup Color Source # | |
Monoid Color Source # | |
Arbitrary PixelRGBA8 Source # | |
arbitrary :: Gen PixelRGBA8 # shrink :: PixelRGBA8 -> [PixelRGBA8] # | |
CoArbitrary PixelRGBA8 Source # | |
coarbitrary :: PixelRGBA8 -> Gen b -> Gen b # |