2module Graphics.Collage where
5import Graphics.LineStyle as LS
6import Graphics.Geometry
7import Native.Graphics.Matrix as Matrix
8import Native.Graphics.Collage as N
25 = FPath LineStyle Path
26 | FShape (Either LineStyle FillStyle) Shape
27 | FImage Int Int (Int,Int) String
31form f = { theta = 0, scale = 1, x = 0, y = 0, form = f }
33fill style shape = form (FShape (Right style) shape)
35filled : Color -> Shape -> Form
36filled color shape = fill (Solid color) shape
38textured : String -> Shape -> Form
39textured src shape = fill (Texture src) shape
41gradient : Gradient -> Shape -> Form
42gradient grad shape = fill (Gradient grad) shape
44outline : LineStyle -> Shape -> Form
45outline style shape = form (FShape (Left style) shape)
47trace : LineStyle -> Path -> Form
48trace style path = form (FPath style path)
50sprite : Int -> Int -> (Int,Int) -> String -> Form
51sprite w h pos src = form (FImage w h pos src)
53toForm : Element -> Form
54toForm e = form (FElement e)
57group fs = form (FGroup fs)
59rotate : Float -> Form -> Form
60rotate t f = { f | theta <- f.theta + t }
62scale s f = { f | scale <- f.scale * s }
64move x y f = { f | x <- f.x + x, y <- f.y + y }
65moveX x f = { f | x <- f.x + x }
66moveY y f = { f | y <- f.y + y }
68collage : Int -> Int -> [Form] -> Element
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list