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

Safe HaskellNone
LanguageHaskell98

Draw.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 #

Instances
ToPoint N Source # 
Instance details

Defined in Draw.Grid

Methods

toPoint :: N -> P2 Double Source #

ToPoint C Source # 
Instance details

Defined in Draw.Grid

Methods

toPoint :: C -> P2 Double Source #

ToPoint DominoC Source # 
Instance details

Defined in Draw.Elements

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 #

cage :: Backend' b => [C] -> Diagram b Source #

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