module Graphics.XDot.Types (
Point,
Rectangle,
Alignment(..),
Object(..),
Operation(..)
)
where
type Point = (Double, Double)
type Rectangle = (Double, Double, Double, Double)
data Alignment = LeftAlign
| CenterAlign
| RightAlign
deriving Show
data Object n = None
| Node n
| Edge n n
deriving (Show, Eq)
data Operation = Ellipse { xy :: Point, w :: Double, h :: Double, filled :: Bool }
| Polygon { points :: [Point], filled :: Bool }
| Polyline { points :: [Point] }
| BSpline { points :: [Point], filled :: Bool }
| Text { baseline :: Point, alignment :: Alignment, width :: Double, text :: String }
| Color { rgba :: (Double, Double, Double, Double), filled :: Bool }
| Font { size :: Double, name :: String }
| Style { style :: String }
| Image { xy :: Point, w :: Double, h :: Double, name :: String }
deriving Show