1
1
mirror of https://github.com/aelve/guide.git synced 2024-11-23 04:07:14 +03:00
guide/favicon/gen.hs
2016-05-10 23:44:20 +03:00

22 lines
534 B
Haskell

{-# LANGUAGE
FlexibleContexts,
GADTs
#-}
-- run as: ./gen -o favicon.png -w 32 -h 32
import Diagrams.Prelude
import Diagrams.Backend.Rasterific.CmdLine
main = defaultMain icon
icon :: Diagram B
icon = lines_ `atop` canvas_
where
line_ = rect 14 3 # fc white . lw none
dot_ = circle 2 # fc white . lw none
line1 = alignL $ hsep 2 [line_, dot_]
line2 = alignL $ hsep 2 [dot_, line_]
lines_ = centerXY $ vsep 3 [line1, line2, line1]
canvas_ = roundedRect 32 32 4 # fc (sRGB24read "7868FF") . lw none