content: module TestHelpers.GfxAst where
  
  type Block = [GfxCommand]
  
  emptyGfx :: Block
  emptyGfx = []
  
  -- TODO
  -- This could be more efficient
  addGfx :: Block -> GfxCommand -> Block
  addGfx block cmd = block ++ [cmd]
  
  type GfxAst = Block
  
  data GfxCommand
    = ShapeCommand ShapeGfx
    | MatrixCommand MatrixGfx
    | ColourCommand ColourGfx
    | ScopeCommand ScopeInstruction
    deriving (Show, Eq)
  
  data ShapeGfx
    = ShapeGfx String Float Float Float
    deriving (Show, Eq)
  
  data MatrixGfx
    = Rotate Float
             Float
             Float
    | Scale Float
            Float
            Float
    | Move Float
           Float
           Float
    deriving (Show, Eq)
  
  data ColourGfx
    = Fill StyleGfx
    | NoFill
    | Stroke Float
             Float
             Float
             Float
    | NoStroke
    deriving (Show, Eq)
  
  data StyleGfx
    = ColourStyle Float
                  Float
                  Float
                  Float
    | TextureStyle String
                   Float
    deriving (Show, Eq)
  
  data ScopeInstruction
    = PushScope
    | PopScope
    deriving (Show, Eq)
  