author | Giulio Cesare Solaroli <giulio.cesare@solaroli.it> | 2011-10-03 16:04:12 (UTC) |
---|---|---|
committer | Giulio Cesare Solaroli <giulio.cesare@solaroli.it> | 2011-10-03 16:04:12 (UTC) |
commit | 541bb378ddece2eab135a8066a16994e94436dea (patch) (unidiff) | |
tree | ff160ea3e26f7fe07fcfd401387c5a0232ca715e /frontend/gamma/js/Clipperz/PM/UI/Canvas/CoverActions | |
parent | 1bf431fd3d45cbdf4afa3e12afefe5d24f4d3bc7 (diff) | |
parent | ecad5e895831337216544e81f1a467e0c68c4a6a (diff) | |
download | clipperz-541bb378ddece2eab135a8066a16994e94436dea.zip clipperz-541bb378ddece2eab135a8066a16994e94436dea.tar.gz clipperz-541bb378ddece2eab135a8066a16994e94436dea.tar.bz2 |
Merge pull request #1 from gcsolaroli/master
First version of the restructured repository
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Canvas/CoverActions') (more/less context) (show whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Canvas/CoverActions/download.js | 120 | ||||
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Canvas/CoverActions/look.js | 208 |
2 files changed, 328 insertions, 0 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/CoverActions/download.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/CoverActions/download.js new file mode 100644 index 0000000..169946a --- a/dev/null +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/CoverActions/download.js | |||
@@ -0,0 +1,120 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2011 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz's Javascript Crypto Library. | ||
6 | Javascript Crypto Library provides web developers with an extensive | ||
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | ||
11 | refer to http://www.clipperz.com | ||
12 | |||
13 | * Javascript Crypto Library is free software: you can redistribute | ||
14 | it and/or modify it under the terms of the GNU Affero General Public | ||
15 | License as published by the Free Software Foundation, either version | ||
16 | 3 of the License, or (at your option) any later version. | ||
17 | |||
18 | * Javascript Crypto Library is distributed in the hope that it will | ||
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | ||
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
21 | See the GNU Affero General Public License for more details. | ||
22 | |||
23 | * You should have received a copy of the GNU Affero General Public | ||
24 | License along with Javascript Crypto Library. If not, see | ||
25 | <http://www.gnu.org/licenses/>. | ||
26 | |||
27 | */ | ||
28 | |||
29 | // | ||
30 | //download.js | ||
31 | //Download | ||
32 | // | ||
33 | //Created by Giulio Cesare Solaroli on 3/15/10 | ||
34 | //Copyright 2010 Clipperz | ||
35 | //This code was generated by Opacity. You may use or modify it in any way. | ||
36 | // | ||
37 | |||
38 | var kClipperz_PM_UI_Canvas_CoverActions_downloadWidth = 46.0; | ||
39 | var kClipperz_PM_UI_Canvas_CoverActions_downloadHeight = 46.0; | ||
40 | |||
41 | function Clipperz_PM_UI_Canvas_CoverActions_download(canvas, aColor, aFillColor, aThickness) | ||
42 | { | ||
43 | var context = canvas.getContext("2d"); | ||
44 | var alignStroke; | ||
45 | var resolution; | ||
46 | var stroke; | ||
47 | var path; | ||
48 | var pointX; | ||
49 | var pointY; | ||
50 | if (window.devicePixelRatio) | ||
51 | resolution = window.devicePixelRatio; | ||
52 | else | ||
53 | resolution = 1.0; | ||
54 | resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_CoverActions_downloadWidth + canvas.height / kClipperz_PM_UI_Canvas_CoverActions_downloadHeight); | ||
55 | |||
56 | context.save(); | ||
57 | context.scale(canvas.width / kClipperz_PM_UI_Canvas_CoverActions_downloadWidth, canvas.height / kClipperz_PM_UI_Canvas_CoverActions_downloadHeight); | ||
58 | context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_CoverActions_downloadWidth, kClipperz_PM_UI_Canvas_CoverActions_downloadHeight); | ||
59 | |||
60 | // arrow | ||
61 | |||
62 | stroke = aThickness; | ||
63 | stroke *= resolution; | ||
64 | if (stroke < 1.0) | ||
65 | stroke = Math.ceil(stroke); | ||
66 | else | ||
67 | stroke = Math.round(stroke); | ||
68 | stroke /= resolution; | ||
69 | alignStroke = (0.5 * stroke * resolution) % 1.0; | ||
70 | context.beginPath(); | ||
71 | pointX = 16.5; | ||
72 | pointY = 22.5; | ||
73 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
74 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
75 | context.moveTo(pointX, pointY); | ||
76 | pointX = 19.5; | ||
77 | pointY = 8.5; | ||
78 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
79 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
80 | context.lineTo(pointX, pointY); | ||
81 | pointX = 30.038; | ||
82 | pointY = 10.605; | ||
83 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
84 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
85 | context.lineTo(pointX, pointY); | ||
86 | pointX = 27.354; | ||
87 | pointY = 24.354; | ||
88 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
89 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
90 | context.lineTo(pointX, pointY); | ||
91 | pointX = 33.28; | ||
92 | pointY = 25.293; | ||
93 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
94 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
95 | context.lineTo(pointX, pointY); | ||
96 | pointX = 19.81; | ||
97 | pointY = 36.828; | ||
98 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
99 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
100 | context.lineTo(pointX, pointY); | ||
101 | pointX = 10.07; | ||
102 | pointY = 21.617; | ||
103 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
104 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
105 | context.lineTo(pointX, pointY); | ||
106 | pointX = 16.5; | ||
107 | pointY = 22.5; | ||
108 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
109 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
110 | context.lineTo(pointX, pointY); | ||
111 | context.closePath(); | ||
112 | context.fillStyle = aFillColor; | ||
113 | context.fill(); | ||
114 | context.strokeStyle = aColor; | ||
115 | context.lineWidth = stroke; | ||
116 | context.lineCap = "square"; | ||
117 | context.stroke(); | ||
118 | |||
119 | context.restore(); | ||
120 | } | ||
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/CoverActions/look.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/CoverActions/look.js new file mode 100644 index 0000000..b8e535b --- a/dev/null +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/CoverActions/look.js | |||
@@ -0,0 +1,208 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2011 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz's Javascript Crypto Library. | ||
6 | Javascript Crypto Library provides web developers with an extensive | ||
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | ||
11 | refer to http://www.clipperz.com | ||
12 | |||
13 | * Javascript Crypto Library is free software: you can redistribute | ||
14 | it and/or modify it under the terms of the GNU Affero General Public | ||
15 | License as published by the Free Software Foundation, either version | ||
16 | 3 of the License, or (at your option) any later version. | ||
17 | |||
18 | * Javascript Crypto Library is distributed in the hope that it will | ||
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | ||
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
21 | See the GNU Affero General Public License for more details. | ||
22 | |||
23 | * You should have received a copy of the GNU Affero General Public | ||
24 | License along with Javascript Crypto Library. If not, see | ||
25 | <http://www.gnu.org/licenses/>. | ||
26 | |||
27 | */ | ||
28 | |||
29 | // | ||
30 | //look.js | ||
31 | //Look | ||
32 | // | ||
33 | //Created by Giulio Cesare Solaroli on 3/15/10 | ||
34 | //Copyright 2010 Clipperz | ||
35 | //This code was generated by Opacity. You may use or modify it in any way. | ||
36 | // | ||
37 | |||
38 | var kClipperz_PM_UI_Canvas_CoverActions_lookWidth = 46.0; | ||
39 | var kClipperz_PM_UI_Canvas_CoverActions_lookHeight = 46.0; | ||
40 | |||
41 | function Clipperz_PM_UI_Canvas_CoverActions_look(canvas, aColor, aFillColor, aThickness) | ||
42 | { | ||
43 | var context = canvas.getContext("2d"); | ||
44 | var alignStroke; | ||
45 | var resolution; | ||
46 | var stroke; | ||
47 | var path; | ||
48 | var pointX; | ||
49 | var pointY; | ||
50 | if (window.devicePixelRatio) | ||
51 | resolution = window.devicePixelRatio; | ||
52 | else | ||
53 | resolution = 1.0; | ||
54 | resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_CoverActions_lookWidth + canvas.height / kClipperz_PM_UI_Canvas_CoverActions_lookHeight); | ||
55 | |||
56 | context.save(); | ||
57 | context.scale(canvas.width / kClipperz_PM_UI_Canvas_CoverActions_lookWidth, canvas.height / kClipperz_PM_UI_Canvas_CoverActions_lookHeight); | ||
58 | context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_CoverActions_lookWidth, kClipperz_PM_UI_Canvas_CoverActions_lookHeight); | ||
59 | |||
60 | // Layer 6 | ||
61 | |||
62 | stroke = aThickness; | ||
63 | stroke *= resolution; | ||
64 | if (stroke < 1.0) | ||
65 | stroke = Math.ceil(stroke); | ||
66 | else | ||
67 | stroke = Math.round(stroke); | ||
68 | stroke /= resolution; | ||
69 | alignStroke = (0.5 * stroke * resolution) % 1.0; | ||
70 | context.save(); | ||
71 | context.translate(17.5, 23.0); | ||
72 | context.rotate(-0.503); | ||
73 | context.translate(-17.5, -23.0); | ||
74 | context.beginPath(); | ||
75 | pointX = 28.5; | ||
76 | pointY = 31.5; | ||
77 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
78 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
79 | context.moveTo(pointX, pointY); | ||
80 | pointX = 28.5; | ||
81 | pointY = 14.5; | ||
82 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
83 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
84 | context.lineTo(pointX, pointY); | ||
85 | pointX = 6.5; | ||
86 | pointY = 14.5; | ||
87 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
88 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
89 | context.lineTo(pointX, pointY); | ||
90 | pointX = 6.5; | ||
91 | pointY = 31.5; | ||
92 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
93 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
94 | context.lineTo(pointX, pointY); | ||
95 | pointX = 28.5; | ||
96 | pointY = 31.5; | ||
97 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
98 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
99 | context.lineTo(pointX, pointY); | ||
100 | context.closePath(); | ||
101 | context.fillStyle = aFillColor; | ||
102 | context.fill(); | ||
103 | context.strokeStyle = aColor; | ||
104 | context.lineWidth = stroke; | ||
105 | context.lineCap = "square"; | ||
106 | context.stroke(); | ||
107 | context.restore(); | ||
108 | |||
109 | // Layer 3 | ||
110 | |||
111 | stroke = aThickness; | ||
112 | stroke *= resolution; | ||
113 | if (stroke < 1.0) | ||
114 | stroke = Math.ceil(stroke); | ||
115 | else | ||
116 | stroke = Math.round(stroke); | ||
117 | stroke /= resolution; | ||
118 | alignStroke = (0.5 * stroke * resolution) % 1.0; | ||
119 | context.save(); | ||
120 | context.translate(22.5, 20.0); | ||
121 | context.rotate(-0.071); | ||
122 | context.translate(-22.5, -20.0); | ||
123 | context.beginPath(); | ||
124 | pointX = 33.5; | ||
125 | pointY = 28.5; | ||
126 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
127 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
128 | context.moveTo(pointX, pointY); | ||
129 | pointX = 33.5; | ||
130 | pointY = 11.5; | ||
131 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
132 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
133 | context.lineTo(pointX, pointY); | ||
134 | pointX = 11.5; | ||
135 | pointY = 11.5; | ||
136 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
137 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
138 | context.lineTo(pointX, pointY); | ||
139 | pointX = 11.5; | ||
140 | pointY = 28.5; | ||
141 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
142 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
143 | context.lineTo(pointX, pointY); | ||
144 | pointX = 33.5; | ||
145 | pointY = 28.5; | ||
146 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
147 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
148 | context.lineTo(pointX, pointY); | ||
149 | context.closePath(); | ||
150 | context.fillStyle = aFillColor; | ||
151 | context.fill(); | ||
152 | context.strokeStyle = aColor; | ||
153 | context.lineWidth = stroke; | ||
154 | context.lineCap = "square"; | ||
155 | context.stroke(); | ||
156 | context.restore(); | ||
157 | |||
158 | // Layer 4 | ||
159 | |||
160 | stroke = aThickness; | ||
161 | stroke *= resolution; | ||
162 | if (stroke < 1.0) | ||
163 | stroke = Math.ceil(stroke); | ||
164 | else | ||
165 | stroke = Math.round(stroke); | ||
166 | stroke /= resolution; | ||
167 | alignStroke = (0.5 * stroke * resolution) % 1.0; | ||
168 | context.save(); | ||
169 | context.translate(27.5, 18.0); | ||
170 | context.rotate(0.232); | ||
171 | context.translate(-27.5, -18.0); | ||
172 | context.beginPath(); | ||
173 | pointX = 38.5; | ||
174 | pointY = 26.5; | ||
175 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
176 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
177 | context.moveTo(pointX, pointY); | ||
178 | pointX = 38.5; | ||
179 | pointY = 9.5; | ||
180 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
181 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
182 | context.lineTo(pointX, pointY); | ||
183 | pointX = 16.5; | ||
184 | pointY = 9.5; | ||
185 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
186 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
187 | context.lineTo(pointX, pointY); | ||
188 | pointX = 16.5; | ||
189 | pointY = 26.5; | ||
190 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
191 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
192 | context.lineTo(pointX, pointY); | ||
193 | pointX = 38.5; | ||
194 | pointY = 26.5; | ||
195 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | ||
196 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | ||
197 | context.lineTo(pointX, pointY); | ||
198 | context.closePath(); | ||
199 | context.fillStyle = aFillColor; | ||
200 | context.fill(); | ||
201 | context.strokeStyle = aColor; | ||
202 | context.lineWidth = stroke; | ||
203 | context.lineCap = "square"; | ||
204 | context.stroke(); | ||
205 | context.restore(); | ||
206 | |||
207 | context.restore(); | ||
208 | } | ||