Copyright | (c) Jonas Weber 2015 |
---|---|
License | ISC |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- type ImageName = String
- newtype DiagramSource = DiagramSource Text
- type ImageFormat = Text
- 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
Instances
Eq DiagramSource Source # | |
Defined in Text.Pandoc.PlantUML.Filter.Types (==) :: DiagramSource -> DiagramSource -> Bool # (/=) :: DiagramSource -> DiagramSource -> Bool # | |
Show DiagramSource Source # | |
Defined in Text.Pandoc.PlantUML.Filter.Types showsPrec :: Int -> DiagramSource -> ShowS # show :: DiagramSource -> String # showList :: [DiagramSource] -> ShowS # |
type ImageFormat = Text 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"
Instances
Eq ImageFileName Source # | |
Defined in Text.Pandoc.PlantUML.Filter.Types (==) :: ImageFileName -> ImageFileName -> Bool # (/=) :: ImageFileName -> ImageFileName -> Bool # | |
Show ImageFileName Source # | Show the image file name by joining basename and extension with a dot, yielding picture.jpg |
Defined in Text.Pandoc.PlantUML.Filter.Types showsPrec :: Int -> ImageFileName -> ShowS # show :: ImageFileName -> String # showList :: [ImageFileName] -> ShowS # |
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.
Instances
ImageIO IO Source # | |
Defined in Text.Pandoc.PlantUML.Filter.IORender doesImageExist :: ImageFileName -> IO Bool Source # renderImage :: ImageFileName -> DiagramSource -> IO () Source # |