svg-icons-2.3.0.0: Svg Icons and more
Safe HaskellSafe-Inferred
LanguageHaskell2010

Main

Description

The main purpose of this module is generating the images found within the haddock documentation of this package.

Synopsis

Documentation

main :: IO () Source #

main = renderAll "./svg"

renderAll :: FilePath -> IO () Source #

Renders all icons and images from this package into the target directory. This is used to generate the example SVGs found in this documentation.

The directory is created if it does not exist, and some subdirectories are created to distinguish between icons or images.

WARNING: this function deletes the target directory and then creates it again. Be careful.

renderExamples :: FilePath -> IO () Source #

Renders the examples from Icons module into the targeted directory.

renderIcons :: FilePath -> IO () Source #

Renders all icons into the targeted directory.

All icons are rendered in a viewbox "-1 -1 2 2" and with 3 style variants:

  • Black fill and no stroke
  • Black stroke and no fill
  • Silver fill and black stroke

renderImages :: FilePath -> IO () Source #

Renders all images into the targeted directory.

renderTest :: FilePath -> Svg -> IO () Source #

Takes an icon as second argument and renders it with all 3 styles (fill, full and stroke) into the targeted directory.

The frame function is used for testing purposes.