hpaste

recent | annotate | new

displayPt :: FunctionalTexture -> IO ()
displayPt pt = 
        case pt of
         Gradient cm -> do
                  drawStr "Gradient"
                  indent $ drawColorMap cm
         Noise gen mnh mxh cm -> do
                  drawStr $ "Noise " ++ show (mnh,mxh)
                  indent $ drawColorMap cm
         Scale s tex -> do
                  drawStr $ "Scale " ++ show s
                  indent $ displayPt tex
         Turbulence gen mnh mxh tex -> do
                  drawStr $ "Turbulence " ++ show (mnh,mxh)
                  indent $ displayPt tex
         PTBlend t t' -> do
                  drawStr "Blend"
                  indent $ displayPt t
                  indent $ displayPt t'


displayContext c act = 
    case c of 
         PTCScale s c' ->
             displayContext c' $ do drawStr ("Scale "++show s)
                                    indent act
         PTCTurbulence g n x c' ->
             displayContext c' $ do drawStr ("Turbulence "++show (n,x))
                                    indent act
         PTCBlendLeft pt c' ->
             displayContext c' $ do drawStr "Blend"
                                    indent (displayPt pt)
                                    indent act
         PTCBlendRight pt c' ->
             displayContext c' $ do drawStr "Blend"
                                    indent act
                                    indent (displayPt pt)
         PTCTop ->
             act