Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Tile a
- rasterize :: forall a. Int -> Int -> Tile a -> Compose ZipList ZipList a
- rasterize' :: Int -> Int -> Tile a -> [[a]]
- toImage :: Int -> Int -> Tile Color -> Image PixelRGBA8
- empty :: Tile Color
- color :: Double -> Double -> Double -> Double -> Tile Color
- cw :: Tile a -> Tile a
- ccw :: Tile a -> Tile a
- flipH :: Tile a -> Tile a
- flipV :: Tile a -> Tile a
- beside :: Tile a -> Tile a -> Tile a
- rows :: Monoid a => [Tile a] -> Tile a
- above :: Tile a -> Tile a -> Tile a
- cols :: Monoid a => [Tile a] -> Tile a
- behind :: Tile Color -> Tile Color -> Tile Color
- quad :: Tile a -> Tile a -> Tile a -> Tile a -> Tile a
- quads :: (a -> a) -> Tile (a -> a)
- swirl :: Tile a -> Tile a
- nona :: Monoid a => Tile a -> Tile a -> Tile a -> Tile a
- haskell :: Tile Color
- sandy :: Tile Color
- 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
:: forall a. Int | resulting width |
-> Int | resulting heigeht |
-> Tile a | |
-> Compose ZipList ZipList a | 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 a | |
-> [[a]] | the resulting "pixels" in row-major order |
Like rasterize
, but with a more convenient output type.
Like rasterize
, but into a format that can be directly saved to disk as
an image.
Tile constructors
quad :: Tile a -> Tile a -> Tile a -> Tile a -> Tile a 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 # |