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

Safe HaskellNone
LanguageHaskell98

Diagrams.Puzzles.Elements

Description

Tools to draw individual puzzle components. In particular contents and decorations for individual cells.

Synopsis

Documentation

ur :: Path R2 Source

The up-right diagonal of a centered unit square.

dr :: Path R2 Source

The down-right diagonal of a centered unit square.

cross :: Path R2 Source

Both diagonals of a centered unit square.

drawCross :: Renderable (Path R2) b => Diagram b R2 Source

Draw a cross.

drawCompassClue :: (Renderable (Path R2) b, Backend b R2) => CompassC -> Diagram b R2 Source

Draw a Compass clue.

thermo :: Renderable (Path R2) b => [P2] -> QDiagram b R2 Any Source

Draw a thermometer, given by a list of bottom-left corners of square cells.

drawThermos :: Renderable (Path R2) b => [Thermometer] -> QDiagram b R2 Any Source

Draw a list of thermometers, given as lists of (Int, Int) cell coordinates.

drawTight :: (Renderable (Path R2) b, Backend b R2) => (a -> Diagram b R2) -> Tightfit a -> Diagram b R2 Source

drawTight d t draws the tight-fit value t, using d to draw the components.

stackWords :: (Backend b R2, Renderable (Path R2) b) => [String] -> QDiagram b R2 Any Source

Stack the given words, left-justified.

drawMarkedWord :: Renderable (Path R2) b => MarkedWord -> QDiagram b R2 Any Source

Mark a word in a grid of letters.

drawMarkedWords :: Renderable (Path R2) b => [MarkedWord] -> QDiagram b R2 Any Source

Apply drawMarkedWord to a list of words.

drawSlalomClue :: (Show a, Renderable (Path R2) b, Backend b R2) => a -> Diagram b R2 Source

Draw a slalom clue.

drawText :: (Backend b R2, Renderable (Path R2) b) => String -> QDiagram b R2 Any Source

Draw text. Shouldn't be more than two characters or so to fit a cell.

drawInt :: (Renderable (Path R2) b, Backend b R2) => Int -> Diagram b R2 Source

Draw an Int.

drawChar :: (Renderable (Path R2) b, Backend b R2) => Char -> Diagram b R2 Source

Draw a character.

drawWords :: (Renderable (Path R2) b, Backend b R2) => [String] -> Diagram b R2 Source

Stack a list of words into a unit square. Scaled such that at least three words will fit.

drawCurve :: Renderable (Path R2) b => [Edge] -> Diagram b R2 Source

Fit a line drawing into a unit square. For example, a Curve Data clue.

drawShade :: Renderable (Path R2) b => Shade -> Diagram b R2 Source

Draw a shadow in the style of Afternoon Skyscrapers.