¤ drawingPart, maybeDrawingPart, et al

Types

drawingPart :: Drawing a b -> DPath -> Drawing a b
maybeDrawingPart :: Drawing a b -> DPath -> Maybe (Drawing a b)
replacePart :: Drawing a b -> DPath -> Drawing a b -> Drawing a b
updatePart :: Drawing a b -> DPath -> (Drawing a b -> Drawing a b) -> Drawing a b
mapLabelDrawing :: (a -> b) -> Drawing a c -> Drawing b c
deletePart :: Drawing a b -> [Int] -> Drawing a b
drawingAnnots :: Drawing a b -> [(DPath, a)]

These are functions that operate on parts of drawings.

There are two functions for extracting a part with a given path. The function drawingPart fails if the path refers to a non-existing part. maybeDrawingPart returns Just part if the part exists, Nothing otherwise.

The functions replacePart and updatePart replace parts of drawings. They fail if the path refers to a non-existing part.

mapLabelDrawing applies a function to all the labels in a drawing.

deletePart deletes a part of a drawing.

drawingAnnots returns the paths and labels of the labelled nodes of a drawing.

Equalities

replacePart drawing path newpart = updatePart drawing path (const newpart)

See Also

The types: Drawing, DPath.

Bugs

This page documents work progress. Information on this page is subject to change without notice and does not represent a commitment on the part of the Fudgets corporation.