author | Giulio Cesare Solaroli <giulio.cesare@clipperz.com> | 2011-10-06 00:36:10 (UTC) |
---|---|---|
committer | Giulio Cesare Solaroli <giulio.cesare@clipperz.com> | 2011-10-06 00:36:10 (UTC) |
commit | 6ba274c79e60e417132b260bd0117c5a68121387 (patch) (unidiff) | |
tree | 57c1f95d0fbf9b80312c5c6b6f4a4f951e31c770 /frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/protect.js | |
parent | 13ebf1b1987a1566d081ff1ba89b4dca197b7d2e (diff) | |
download | clipperz-6ba274c79e60e417132b260bd0117c5a68121387.zip clipperz-6ba274c79e60e417132b260bd0117c5a68121387.tar.gz clipperz-6ba274c79e60e417132b260bd0117c5a68121387.tar.bz2 |
Fixed the copyright headers
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/protect.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/protect.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/protect.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/protect.js index 501b69b..b829ed6 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/protect.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Features/protect.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
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 | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | 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 | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | // | 26 | // |
30 | //protect.js | 27 | //protect.js |
31 | //protect | 28 | //protect |
32 | // | 29 | // |
33 | //Created by Giulio Cesare Solaroli on 3/7/10 | 30 | //Created by Giulio Cesare Solaroli on 3/7/10 |
34 | //Copyright 2010 Clipperz | 31 | //Copyright 2010 Clipperz |
35 | //This code was generated by Opacity. You may use or modify it in any way. | 32 | //This code was generated by Opacity. You may use or modify it in any way. |
36 | // | 33 | // |
37 | 34 | ||
38 | var kClipperz_PM_UI_Canvas_Features_protectWidth = 76.0; | 35 | var kClipperz_PM_UI_Canvas_Features_protectWidth = 76.0; |
39 | var kClipperz_PM_UI_Canvas_Features_protectHeight = 76.0; | 36 | var kClipperz_PM_UI_Canvas_Features_protectHeight = 76.0; |
40 | 37 | ||
41 | function Clipperz_PM_UI_Canvas_Features_protect(canvas, aColor, aBannerColor, aBannerBackgroundColor) | 38 | function Clipperz_PM_UI_Canvas_Features_protect(canvas, aColor, aBannerColor, aBannerBackgroundColor) |
42 | { | 39 | { |
43 | var context = canvas.getContext("2d"); | 40 | var context = canvas.getContext("2d"); |
44 | var alignStroke; | 41 | var alignStroke; |
45 | var resolution; | 42 | var resolution; |
46 | var path; | 43 | var path; |
47 | var pointX; | 44 | var pointX; |
48 | var pointY; | 45 | var pointY; |
49 | var controlPoint1X; | 46 | var controlPoint1X; |
50 | var controlPoint1Y; | 47 | var controlPoint1Y; |
51 | var controlPoint2X; | 48 | var controlPoint2X; |
52 | var controlPoint2Y; | 49 | var controlPoint2Y; |
53 | var stroke; | 50 | var stroke; |
54 | if (window.devicePixelRatio) | 51 | if (window.devicePixelRatio) |
55 | resolution = window.devicePixelRatio; | 52 | resolution = window.devicePixelRatio; |
56 | else | 53 | else |
57 | resolution = 1.0; | 54 | resolution = 1.0; |
58 | resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_Features_protectWidth + canvas.height / kClipperz_PM_UI_Canvas_Features_protectHeight); | 55 | resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_Features_protectWidth + canvas.height / kClipperz_PM_UI_Canvas_Features_protectHeight); |
59 | 56 | ||
60 | context.save(); | 57 | context.save(); |
61 | context.scale(canvas.width / kClipperz_PM_UI_Canvas_Features_protectWidth, canvas.height / kClipperz_PM_UI_Canvas_Features_protectHeight); | 58 | context.scale(canvas.width / kClipperz_PM_UI_Canvas_Features_protectWidth, canvas.height / kClipperz_PM_UI_Canvas_Features_protectHeight); |
62 | context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Features_protectWidth, kClipperz_PM_UI_Canvas_Features_protectHeight); | 59 | context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Features_protectWidth, kClipperz_PM_UI_Canvas_Features_protectHeight); |
63 | 60 | ||
64 | // Layer 1 | 61 | // Layer 1 |
65 | 62 | ||
66 | alignStroke = 0.0; | 63 | alignStroke = 0.0; |
67 | context.beginPath(); | 64 | context.beginPath(); |
68 | pointX = 38.5; | 65 | pointX = 38.5; |
69 | pointY = 36.0; | 66 | pointY = 36.0; |
70 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 67 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
71 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 68 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
72 | context.moveTo(pointX, pointY); | 69 | context.moveTo(pointX, pointY); |
73 | pointX = 37.068; | 70 | pointX = 37.068; |
74 | pointY = 38.816; | 71 | pointY = 38.816; |
75 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 72 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
76 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 73 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
77 | controlPoint1X = 37.41; | 74 | controlPoint1X = 37.41; |
78 | controlPoint1Y = 36.234; | 75 | controlPoint1Y = 36.234; |
79 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; | 76 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; |
80 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; | 77 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; |
81 | controlPoint2X = 37.175; | 78 | controlPoint2X = 37.175; |
82 | controlPoint2Y = 37.907; | 79 | controlPoint2Y = 37.907; |
83 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; | 80 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; |
84 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; | 81 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; |
85 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); | 82 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); |
86 | pointX = 37.031; | 83 | pointX = 37.031; |
87 | pointY = 40.802; | 84 | pointY = 40.802; |
88 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 85 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
89 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 86 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
90 | controlPoint1X = 36.991; | 87 | controlPoint1X = 36.991; |
91 | controlPoint1Y = 39.474; | 88 | controlPoint1Y = 39.474; |
92 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; | 89 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; |
93 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; | 90 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; |
94 | controlPoint2X = 36.98; | 91 | controlPoint2X = 36.98; |
95 | controlPoint2Y = 40.141; | 92 | controlPoint2Y = 40.141; |
96 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; | 93 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; |
97 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; | 94 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; |
98 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); | 95 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); |
99 | pointX = 37.258; | 96 | pointX = 37.258; |
100 | pointY = 42.23; | 97 | pointY = 42.23; |
101 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 98 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
102 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 99 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
103 | controlPoint1X = 37.068; | 100 | controlPoint1X = 37.068; |
104 | controlPoint1Y = 41.283; | 101 | controlPoint1Y = 41.283; |
105 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; | 102 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; |
106 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; | 103 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; |
107 | controlPoint2X = 37.139; | 104 | controlPoint2X = 37.139; |
108 | controlPoint2Y = 41.762; | 105 | controlPoint2Y = 41.762; |
109 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; | 106 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; |
110 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; | 107 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; |
111 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); | 108 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); |
112 | pointX = 38.348; | 109 | pointX = 38.348; |
113 | pointY = 43.979; | 110 | pointY = 43.979; |
114 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 111 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
115 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 112 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
116 | controlPoint1X = 37.402; | 113 | controlPoint1X = 37.402; |
117 | controlPoint1Y = 42.799; | 114 | controlPoint1Y = 42.799; |
118 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; | 115 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; |
119 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; | 116 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; |
120 | controlPoint2X = 37.682; | 117 | controlPoint2X = 37.682; |