on master help sign in
Add scaleX and scaleY
a654bfaMichael Sondergaard
libraries/Transform2D.elm+8
@@ -49,6 +49,14 @@ rotation = Native.Transform2D.rotation
49translation : Float -> Float -> Transform2D
49translation : Float -> Float -> Transform2D
50translation = Native.Transform2D.translation
50translation = Native.Transform2D.translation
51
51
52+{-| Creates a transformation for horizontal scaling -}
53+scaleX : Float -> Transform2D
54+scaleX x = matrix x 0 0 1 0 0
55+
56+{-| Creates a transformation for vertical scaling -}
57+scaleY : Float -> Transform2D
58+scaleY y = matrix y 0 0 1 0 0
59+
52{-| Multiplies two transforms together:
60{-| Multiplies two transforms together:
53
61
54 multiply a b
62 multiply a b