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

Safe HaskellNone

Diagrams.Puzzles.Elements

Description

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

Synopsis

Documentation

ur :: Path R2Source

The up-right diagonal of a centered unit square.

dr :: Path R2Source

The down-right diagonal of a centered unit square.

cross :: Path R2Source

Both diagonals of a centered unit square.

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

Draw a cross.

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

Draw a Compass clue.

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

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

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

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 R2Source

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 AnySource

Stack the given words, left-justified.

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

Mark a word in a grid of letters.

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

Apply drawMarkedWord to a list of words.

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

Draw a slalom clue.

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

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 R2Source

Draw an Int.

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

Draw a character.

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

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 R2Source

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

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

Draw a shadow in the style of Afternoon Skyscrapers.

drawTapaClue :: (Backend b R2, Renderable (Path R2) b) => TapaClue -> Diagram b R2Source

Draws the digits of a tapa clue, ordered left to right, top to bottom.