on master help sign in
Rename some of the Graphics libraries
d114746evancz
libraries/Color.elm+1−9
@@ -1,13 +1,5 @@
1
1
2−module Graphics.Color (rgba,rgb,hsva,hsv,
2+module Color where
3− complement,
4− red,lime,blue,
5− yellow,cyan,magenta,
6− maroon,navy,green,
7− teal,purple,
8− violet,forestGreen,
9− black,white,gray,grey,
10− linear,radial) where
11
3
12data Color = Color Int Int Int Float
4data Color = Color Int Int Int Float
13
5
libraries/Graphics/Collage.elm+2−2
@@ -3,10 +3,10 @@ module Graphics.Collage where
3
3
4import Either
4import Either
5import Graphics.Geometry
5import Graphics.Geometry
6−import Native.Graphics.Matrix as Matrix
6+import Native.Matrix2D as Matrix
7import Native.Graphics.Collage as N
7import Native.Graphics.Collage as N
8import Graphics.Element
8import Graphics.Element
9−import Graphics.Color as Color
9+import Color as Color
10
10
11type Form = {
11type Form = {
12 theta : Float,
12 theta : Float,
libraries/Graphics/Element.elm+1−1
@@ -15,7 +15,7 @@ module Graphics.Element (widthOf, heightOf, sizeOf,
15import Native.Utils (guid, max, htmlHeight)
15import Native.Utils (guid, max, htmlHeight)
16import JavaScript as JS
16import JavaScript as JS
17import List as List
17import List as List
18−import Graphics.Color as Color
18+import Color
19import Maybe (Just, Nothing)
19import Maybe (Just, Nothing)
20
20
21type Properties = {
21type Properties = {
libraries/Matrix2D.elm+2−2
@@ -1,7 +1,7 @@
1
1
2−module Graphics.Matrix where
2+module Matrix2D where
3
3
4−import Native.Graphics.Matrix as M
4+import Native.Matrix2D as M
5
5
6identity : Matrix
6identity : Matrix
7
7
libraries/Native/Graphics/Color.js → libraries/Native/Color.jsrenamed+3−4
@@ -1,11 +1,10 @@
1
1
2
2
3−Elm.Native.Graphics.Color = function(elm) {
3+Elm.Native.Color = function(elm) {
4 "use strict";
4 "use strict";
5
5
6 elm.Native = elm.Native || {};
6 elm.Native = elm.Native || {};
7− elm.Native.Graphics = elm.Native.Graphics || {};
8− if (elm.Native.Graphics.Color) return elm.Native.Graphics.Color;
7+ if (elm.Native.Color) return elm.Native.Color;
9
8
10 function complement(rgb) {
9 function complement(rgb) {
11 var hsv = toHSV(rgb);
10 var hsv = toHSV(rgb);
@@ -57,7 +56,7 @@ Elm.Native.Graphics.Color = function(elm) {
57 return { ctor:"Color", _0:norm(r+m), _1:norm(g+m), _2:norm(b+m), _3:1 };
56 return { ctor:"Color", _0:norm(r+m), _1:norm(g+m), _2:norm(b+m), _3:1 };
58 }
57 }
59
58
60− return elm.Native.Graphics.Color = {
59+ return elm.Native.Color = {
61 hsva:F4(hsva),
60 hsva:F4(hsva),
62 hsv:F3(hsv),
61 hsv:F3(hsv),
63 complement:complement
62 complement:complement
libraries/Native/Graphics/Matrix.js → libraries/Native/Matrix2D.jsrenamed+3−4
@@ -1,10 +1,9 @@
1
1
2−Elm.Native.Graphics.Matrix = function(elm) {
2+Elm.Native.Matrix2D = function(elm) {
3 "use strict";
3 "use strict";
4
4
5 elm.Native = elm.Native || {};
5 elm.Native = elm.Native || {};
6− elm.Native.Graphics = elm.Native.Graphics || {};
7− if (elm.Native.Graphics.Matrix) return elm.Native.Graphics.Matrix;
6+ if (elm.Native.Matrix2D) return elm.Native.Matrix2D;
8
7
9 try { Float32Array; } catch(e) { Float32Array = Array; }
8 try { Float32Array; } catch(e) { Float32Array = Array; }
10 var A = Float32Array;
9 var A = Float32Array;
@@ -54,7 +53,7 @@ Elm.Native.Graphics.Matrix = function(elm) {
54 return transform(m[0], m[3], m[1], m[4], m[2], m[5], n);
53 return transform(m[0], m[3], m[1], m[4], m[2], m[5], n);
55 }
54 }
56
55
57− return elm.Native.Graphics.Matrix = {
56+ return elm.Native.Matrix2D = {
58 identity:identity,
57 identity:identity,
59 matrix:F6(matrix),
58 matrix:F6(matrix),
60 multiply:F2(multiply),
59 multiply:F2(multiply),
libraries/Native/Graphics/Text.js → libraries/Native/Text.jsrenamed+4−5
@@ -1,14 +1,13 @@
1
1
2−Elm.Native.Graphics.Text = function(elm) {
2+Elm.Native.Text = function(elm) {
3 'use strict';
3 'use strict';
4
4
5 elm.Native = elm.Native || {};
5 elm.Native = elm.Native || {};
6− elm.Native.Graphics = elm.Native.Graphics || {};
7− if (elm.Native.Graphics.Text) return elm.Native.Graphics.Text;
6+ if (elm.Native.Text) return elm.Native.Text;
8
7
9 var JS = Elm.JavaScript(elm);
8 var JS = Elm.JavaScript(elm);
10 var htmlHeight = Elm.Native.Utils(elm).htmlHeight;
9 var htmlHeight = Elm.Native.Utils(elm).htmlHeight;
11− var Color = Elm.Native.Graphics.Color(elm);
10+ var Color = Elm.Native.Color(elm);
12 var Element = Elm.Graphics.Element(elm);
11 var Element = Elm.Graphics.Element(elm);
13 var show = Elm.Native.Show(elm).show;
12 var show = Elm.Native.Show(elm).show;
14
13
@@ -110,7 +109,7 @@ Elm.Native.Graphics.Text = function(elm) {
110 return position('left')(toText(v));
109 return position('left')(toText(v));
111 }
110 }
112
111
113− return elm.Native.Graphics.Text = {
112+ return elm.Native.Text = {
114 toText: toText,
113 toText: toText,
115
114
116 header : header,
115 header : header,
libraries/Text.elm+2−2
@@ -1,7 +1,7 @@
1
1
2−module Graphics.Text where
2+module Text where
3
3
4−import Native.Graphics.Text as T
4+import Native.Text as T
5
5
6
6
7-- Convert a string into text which can be styled and displayed.
7-- Convert a string into text which can be styled and displayed.