@@ -162,37 +162,37 @@ transformation.
162groupTransform : Transform2D -> [Form] -> Form
162groupTransform : Transform2D -> [Form] -> Form
163groupTransform matrix fs = form (FGroup matrix fs)
163groupTransform matrix fs = form (FGroup matrix fs)
165−{-| Rotate a form by a given angle. Rotate takes standard Elm angles (radians)
166−and turns things counterclockwise. So to turn `form` 30° to the left
167−you would say, `(rotate (degrees 30) form)`.
169−rotate : number -> Form -> Form
170−rotate t f = { f | theta <- f.theta + t }
172−{-| Scale a form by a given factor. Scaling by 2 doubles the size.
174−scale : number -> Form -> Form
175−scale s f = { f | scale <- f.scale * s }
177{-| Move a form by the given amount. This is a relative translation so
165{-| Move a form by the given amount. This is a relative translation so
178`(move (10,10) form)` would move `form` ten pixels up and ten pixels to the
166`(move (10,10) form)` would move `form` ten pixels up and ten pixels to the
181−move : (number,number) -> Form -> Form
169+move : (Float,Float) -> Form -> Form
182move (x,y) f = { f | x <- f.x + x, y <- f.y + y }
170move (x,y) f = { f | x <- f.x + x, y <- f.y + y }
184{-| Move a shape in the x direction. This is relative so `(moveX 10 form)` moves
172{-| Move a shape in the x direction. This is relative so `(moveX 10 form)` moves
185`form` 10 pixels to the right.
173`form` 10 pixels to the right.
187−moveX : number -> Form -> Form
175+moveX : Float -> Form -> Form
188moveX x f = { f | x <- f.x + x }
176moveX x f = { f | x <- f.x + x }
190{-| Move a shape in the y direction. This is relative so `(moveY 10 form)` moves
178{-| Move a shape in the y direction. This is relative so `(moveY 10 form)` moves
191`form` upwards by 10 pixels.
179`form` upwards by 10 pixels.
193−moveY : number -> Form -> Form
181+moveY : Float -> Form -> Form
194moveY y f = { f | y <- f.y + y }
182moveY y f = { f | y <- f.y + y }
184+{-| Scale a form by a given factor. Scaling by 2 doubles the size.
186+scale : Float -> Form -> Form
187+scale s f = { f | scale <- f.scale * s }
189+{-| Rotate a form by a given angle. Rotate takes standard Elm angles (radians)
190+and turns things counterclockwise. So to turn `form` 30° to the left
191+you would say, `(rotate (degrees 30) form)`.
193+rotate : Float -> Form -> Form
194+rotate t f = { f | theta <- f.theta + t }
196{-| Set the alpha of a `Form`. The default is 1, and 0 is totally transparent. -}
196{-| Set the alpha of a `Form`. The default is 1, and 0 is totally transparent. -}
197alpha : Float -> Form -> Form
197alpha : Float -> Form -> Form
198alpha a f = { f | alpha <- a }
198alpha a f = { f | alpha <- a }