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

Safe HaskellNone
LanguageHaskell98

Draw.Elements

Description

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

Synopsis

Documentation

ur :: Path V2 Double Source #

The up-right diagonal of a centered unit square.

dr :: Path V2 Double Source #

The down-right diagonal of a centered unit square.

cross :: Path V2 Double Source #

Both diagonals of a centered unit square.

drawCross :: Backend' b => Bool -> Diagram b Source #

Draw a cross.

drawCompassClue :: Backend' b => CompassC -> Diagram b Source #

Draw a Compass clue.

thermo :: Backend' b => [P2 Double] -> Diagram b Source #

Draw a thermometer.

drawThermos :: Backend' b => [Thermometer] -> Diagram b Source #

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

drawTight :: Backend' b => (a -> Diagram b) -> Tightfit a -> Diagram b Source #

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

stackWords :: Backend' b => [String] -> Diagram b Source #

Stack the given words, left-justified.

stackWordsLeft :: Backend' b => [String] -> Diagram b Source #

Stack the given words, left-justified, a bit more generous, nice font

stackWordsRight :: Backend' b => [String] -> Diagram b Source #

Stack the given words, left-justified, a bit more generous, nice font

drawMarkedWord :: Backend' b => MarkedWord -> Diagram b Source #

Mark a word in a grid of letters.

drawMarkedWords :: Backend' b => [MarkedWord] -> Diagram b Source #

Apply drawMarkedWord to a list of words.

drawSlalomClue :: (Show a, Backend' b) => a -> Diagram b Source #

Draw a slalom clue.

drawText :: Backend' b => String -> Diagram b Source #

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

drawInt :: Backend' b => Int -> Diagram b Source #

Draw an Int.

drawChar :: Backend' b => Char -> Diagram b Source #

Draw a character.

drawWords :: Backend' b => [String] -> Diagram b Source #

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

drawCurve :: Backend' b => [Edge N] -> Diagram b Source #

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

drawShadow :: Backend' b => Shade -> Diagram b Source #

Draw a shadow in the style of Afternoon Skyscrapers.

drawTapaClue :: Backend' b => TapaClue -> Diagram b Source #

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

newtype DominoC Source #

Constructors

DominoC C 
Instances
Eq DominoC Source # 
Instance details

Defined in Draw.Elements

Methods

(==) :: DominoC -> DominoC -> Bool #

(/=) :: DominoC -> DominoC -> Bool #

Ord DominoC Source # 
Instance details

Defined in Draw.Elements

ToPoint DominoC Source # 
Instance details

Defined in Draw.Elements

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

invertMap :: (Eq a, Ord a) => Map k a -> Map a [k] Source #