Copyright | (c) Jonas Weber, 2015 |
---|---|
License | ISC |
Safe Haskell | Safe |
Language | Haskell2010 |
- type ImageName = String
- newtype DiagramSource = DiagramSource String
- type ImageFormat = String
- data ImageFileName = ImageFileName ImageName ImageFormat
- class Monad m => ImageIO m where
- doesImageExist :: ImageFileName -> m Bool
- renderImage :: ImageFileName -> DiagramSource -> m ()
Documentation
newtype DiagramSource Source
The source of a diagram
type ImageFormat = String Source
An image format, e.g. "eps"
data ImageFileName Source
A filename of an image. It contains the basename (myawesomepicture) and the extension (jpg). It can be shown, which is basically "myawesomepicture.jpg"
Eq ImageFileName Source | |
Show ImageFileName Source | Show the image file name by joining basename and extension with a dot, yielding picture.jpg |
class Monad m => ImageIO m where Source
External impure actions are encapsulated in this monad.
doesImageExist :: ImageFileName -> m Bool Source
Tells whether an image with the given file name is already present in the store (e.g., the filesystem).
renderImage :: ImageFileName -> DiagramSource -> m () Source
Calls out to an external diagram processor (PlantUML) to render the source to the given image file name.