@@ -21,7 +21,9 @@ data BasicForm
21 | FElement Element
21 | FElement Element
22 | FGroup [Form]
22 | FGroup [Form]
24+ident = Matrix.identity
24−fill style shape = Form [] (FShape (Right style) shape)
26+fill style shape = Form ident (FShape (Right style) shape)
26filled : Color -> Shape -> Form
28filled : Color -> Shape -> Form
27filled color shape = fill (Solid color) shape
29filled color shape = fill (Solid color) shape
@@ -33,18 +35,18 @@ gradient : Gradient -> Shape -> Form
33gradient grad shape = fill (Gradient grad) shape
35gradient grad shape = fill (Gradient grad) shape
35outline : LineStyle -> Shape -> Form
37outline : LineStyle -> Shape -> Form
36−outline style shape = Form [] (FShape (Left style) shape)
38+outline style shape = Form ident (FShape (Left style) shape)
38−outline : LineStyle -> Path -> Form
40+trace : LineStyle -> Path -> Form
39−trace style path = Form [] (FPath style path)
41+trace style path = Form ident (FPath style path)
41sprite : Int -> Int -> (Int,Int) -> String -> Form
43sprite : Int -> Int -> (Int,Int) -> String -> Form
42−sprite w h pos src = Form [] (FImage w h pos src)
44+sprite w h pos src = Form ident (FImage w h pos src)
44toForm : Element -> Form
46toForm : Element -> Form
45−toForm e = Form [] (FElement e)
47+toForm e = Form ident (FElement e)
47−group fs = Form [] (FGroup fs)
49+group fs = Form ident (FGroup fs)
49rotate t f = { form = f.form, transform = Matrix.rotate t f.transform }
51rotate t f = { form = f.form, transform = Matrix.rotate t f.transform }
50scale s f = { form = f.form, transform = Matrix.scale s s f.transform }
52scale s f = { form = f.form, transform = Matrix.scale s s f.transform }