ellipseToSVG :: Bool -> Shape -> S.Svg
ellipseToSVG styled ellipse =
    S.g ! A.id_ (stringValue (shapeId_ ellipse))
        ! A.class_ "bool" $ do
            S.ellipse ! A.cx (stringValue . show . fst $ shapePos ellipse)
                      ! A.cy (stringValue . show . snd $ shapePos ellipse)
                      ! A.rx (stringValue . show $ shapeWidth ellipse / 2)
                      ! A.ry (stringValue . show $ shapeHeight ellipse / 2)
                      ! if styled
                        then
                            A.stroke "black" `mappend`
                            A.fill "none"
                        else mempty
            sequence_ $ map
                (textToSVG styled BoolNode (fst $ shapePos ellipse))
                (shapeText ellipse)

-- | Converts a text value to SVG.
ellipseToSVG :: Bool -> Shape -> S.Svg
ellipseToSVG styled ellipse =
    S.g ! A.id_ (stringValue (shapeId_ ellipse))
        ! A.class_ "bool" $ do
            S.ellipse ! A.cx (stringValue . show . fst $ shapePos ellipse)
                      ! A.cy (stringValue . show . snd $ shapePos ellipse)
                      ! A.rx (stringValue . show $ shapeWidth ellipse / 2)
                      ! A.ry (stringValue . show $ shapeHeight ellipse / 2)
                      ! if styled
                        then
                            A.stroke "black" `mappend`
                            A.fill "none"
                        else mempty
            sequence_ $ map
                (textToSVG styled BoolNode (fst $ shapePos ellipse))
                (shapeText ellipse)

-- | Converts a text value to SVG.
ellipseToSVG styled ellipse =
    S.g ! A.id_ (stringValue (shapeId_ ellipse))
        ! A.class_ "bool" $ do
            S.ellipse ! A.cx (stringValue . show . fst $ shapePos ellipse)
                      ! A.cy (stringValue . show . snd $ shapePos ellipse)
                      ! A.rx (stringValue . show $ shapeWidth ellipse / 2)
                      ! A.ry (stringValue . show $ shapeHeight ellipse / 2)
                      ! if styled
                        then
                            A.stroke "black" `mappend`
                            A.fill "none"
                        else mempty
            sequence_ $ map
                (textToSVG styled BoolNode (fst $ shapePos ellipse))
                (shapeText ellipse)

-- | Converts a text value to SVG.