packages feed

moffy-samples-events-0.1.0.0: src/Control/Moffy/Samples/Viewable/Shape.hs

{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -Wall -fno-warn-tabs #-}

module Control.Moffy.Samples.Viewable.Shape (
	Line(..), Box(..), Rect(..), BColor(..), FillPolygon(..) ) where

import Data.Type.Set

import Control.Moffy.Samples.Viewable.Basic

data Line = Line' Color LineWidth Position Position deriving Show
numbered [t| Line |]

data Box = Box Rect BColor deriving Show
data Rect = Rect { leftup :: Position, rightdown :: Position  } deriving Show
data BColor = Red | Green | Blue | Yellow | Cyan | Magenta deriving (Show, Enum)
numbered [t| Box |]

data FillPolygon = FillPolygon Color [Position] deriving Show
numbered [t| FillPolygon |]