Merge Picture and RenderType datatypes

This commit is contained in:
jgk
2021-07-25 02:12:55 +02:00
parent 84a9badea8
commit f5873db68d
8 changed files with 143 additions and 238 deletions
+14 -14
View File
@@ -99,20 +99,20 @@ flat4 (x,y,z,w) = [x,y,z,w]
{-# INLINE flat3 #-}
{-# INLINE flat4 #-}
data Picture
= Blank
| Text String
| Polygon [Point2]
| PolygonZ [Point2] Float
| BezierQuad [(Point2,RGBA,Point2,Point2)]
| PolygonCol [(Point2,RGBA)]
| Poly3D [(Point3,RGBA)]
| Circle RGBA RGBA Float
| ThickArc Float Float Float Float
| Pictures [Picture]
| OverPic (Point3 -> Point3) (Point4 -> Point4) Picture
| OnLayer Int Picture
type Picture = [(Int,RenderType)]
-- = Blank
-- | Text String
-- | Polygon [Point2]
-- | PolygonZ [Point2] Float
-- | BezierQuad [(Point2,RGBA,Point2,Point2)]
-- | PolygonCol [(Point2,RGBA)]
-- | Poly3D [(Point3,RGBA)]
-- | Circle RGBA RGBA Float
-- | ThickArc Float Float Float Float
-- | Pictures [Picture]
-- | OverPic (Point3 -> Point3) (Point4 -> Point4) Picture
-- | OnLayer Int Picture
blank :: Picture
{-# INLINE blank #-}
blank = Blank
blank = []