puzzle-draw-0.2.0.0: Creating graphics for pencil puzzles.

Safe HaskellNone
LanguageHaskell98

Diagrams.Puzzles.Grid

Synopsis

Documentation

(.--.) :: AffineSpace p => p -> p -> Diff p Source #

class ToPoint a where Source #

Minimal complete definition

toPoint

Methods

toPoint :: a -> P2 Double Source #

dot :: Backend' b => Diagram b Source #

Draw a small black dot with no envelope.

irregularGridPaths :: Grid C a -> (Path V2 Double, Path V2 Double) Source #

`irregularGridPaths g` is a pair `(outer, inner)` of paths.

outer consists of the loops that make up the border of the grid (assuming the grid is connected orthogonally). They are reoriented to be compatible with outLine; for some reason, reversePath on the immediate result does not work.

inner consists of the individual inner segments.

onGrid :: (Transformable a, Monoid a, InSpace V2 Double a) => Double -> Double -> (t -> a) -> [(Coord, t)] -> a Source #

edgeStyle :: (HasStyle a, InSpace V2 Double a) => a -> a Source #

drawEdges :: (ToPoint k, Backend' b) => [Edge k] -> Diagram b Source #

drawAreas :: (Backend' b, Eq a) => Grid C a -> Diagram b Source #

distrib :: (Transformable c, Monoid c, InSpace V2 Double c) => V2 Double -> (Int, Int) -> Double -> [c] -> c Source #