-- | Converts a region to SVG.
regionToSVG :: Bool -> Path -> S.Svg
regionToSVG styled path =
    S.path ! A.id_ (stringValue $ "region" ++ pathId_ path)
           ! A.class_ "region"
           ! A.d (stringValue $ 'M' : buildPathString (pathPoints path))
           ! A.style (stringValue $ "fill:" ++ pathFill path ++ ";" ++
                      if styled
                      then
                          ";opacity:0.7;fill-opacity:0.58;"
                      else "")
regionToSVG :: Bool -> Path -> S.Svg
regionToSVG styled path =
    S.path ! A.id_ (stringValue $ "region" ++ pathId_ path)
           ! A.class_ "region"
           ! A.d (stringValue $ 'M' : buildPathString (pathPoints path))
           ! A.style (stringValue $ "fill:" ++ pathFill path ++ ";" ++
                      if styled
                      then
                          ";opacity:0.7;fill-opacity:0.58;"
                      else "")
regionToSVG styled path =
    S.path ! A.id_ (stringValue $ "region" ++ pathId_ path)
           ! A.class_ "region"
           ! A.d (stringValue $ 'M' : buildPathString (pathPoints path))
           ! A.style (stringValue $ "fill:" ++ pathFill path ++ ";" ++
                      if styled
                      then
                          ";opacity:0.7;fill-opacity:0.58;"
                      else "")