Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/info.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/info.js | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/info.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/info.js index fad5c10..2501992 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/info.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/info.js | |||
@@ -1,118 +1,116 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | // | 24 | // |
27 | //info.js | 25 | //info.js |
28 | //i | 26 | //i |
29 | // | 27 | // |
30 | //Created by Giulio Cesare Solaroli on 3/7/10 | 28 | //Created by Giulio Cesare Solaroli on 3/7/10 |
31 | //Copyright 2010 Clipperz | 29 | //Copyright 2010 Clipperz |
32 | //This code was generated by Opacity. You may use or modify it in any way. | 30 | //This code was generated by Opacity. You may use or modify it in any way. |
33 | // | 31 | // |
34 | 32 | ||
35 | var kClipperz_PM_UI_Canvas_Marks_infoWidth = 50.0; | 33 | var kClipperz_PM_UI_Canvas_Marks_infoWidth = 50.0; |
36 | var kClipperz_PM_UI_Canvas_Marks_infoHeight = 50.0; | 34 | var kClipperz_PM_UI_Canvas_Marks_infoHeight = 50.0; |
37 | 35 | ||
38 | function Clipperz_PM_UI_Canvas_Marks_info(canvas, aColor) | 36 | function Clipperz_PM_UI_Canvas_Marks_info(canvas, aColor) |
39 | { | 37 | { |
40 | var context = canvas.getContext("2d"); | 38 | var context = canvas.getContext("2d"); |
41 | var alignStroke; | 39 | var alignStroke; |
42 | var resolution; | 40 | var resolution; |
43 | var path; | 41 | var path; |
44 | var pointX; | 42 | var pointX; |
45 | var pointY; | 43 | var pointY; |
46 | var controlPoint1X; | 44 | var controlPoint1X; |
47 | var controlPoint1Y; | 45 | var controlPoint1Y; |
48 | var controlPoint2X; | 46 | var controlPoint2X; |
49 | var controlPoint2Y; | 47 | var controlPoint2Y; |
50 | var color; | 48 | var color; |
51 | if (window.devicePixelRatio) | 49 | if (window.devicePixelRatio) |
52 | resolution = window.devicePixelRatio; | 50 | resolution = window.devicePixelRatio; |
53 | else | 51 | else |
54 | resolution = 1.0; | 52 | resolution = 1.0; |
55 | resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_Marks_infoWidth + canvas.height / kClipperz_PM_UI_Canvas_Marks_infoHeight); | 53 | resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_Marks_infoWidth + canvas.height / kClipperz_PM_UI_Canvas_Marks_infoHeight); |
56 | 54 | ||
57 | context.save(); | 55 | context.save(); |
58 | context.scale(canvas.width / kClipperz_PM_UI_Canvas_Marks_infoWidth, canvas.height / kClipperz_PM_UI_Canvas_Marks_infoHeight); | 56 | context.scale(canvas.width / kClipperz_PM_UI_Canvas_Marks_infoWidth, canvas.height / kClipperz_PM_UI_Canvas_Marks_infoHeight); |
59 | context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Marks_infoWidth, kClipperz_PM_UI_Canvas_Marks_infoHeight); | 57 | context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Marks_infoWidth, kClipperz_PM_UI_Canvas_Marks_infoHeight); |
60 | 58 | ||
61 | // Layer 1 | 59 | // Layer 1 |
62 | 60 | ||
63 | alignStroke = 0.0; | 61 | alignStroke = 0.0; |
64 | context.beginPath(); | 62 | context.beginPath(); |
65 | pointX = 30.253; | 63 | pointX = 30.253; |
66 | pointY = 37.436; | 64 | pointY = 37.436; |
67 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 65 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
68 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 66 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
69 | context.moveTo(pointX, pointY); | 67 | context.moveTo(pointX, pointY); |
70 | pointX = 28.505; | 68 | pointX = 28.505; |
71 | pointY = 37.022; | 69 | pointY = 37.022; |
72 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 70 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
73 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 71 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
74 | context.lineTo(pointX, pointY); | 72 | context.lineTo(pointX, pointY); |
75 | pointX = 27.677; | 73 | pointX = 27.677; |
76 | pointY = 35.09; | 74 | pointY = 35.09; |
77 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 75 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
78 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 76 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
79 | controlPoint1X = 27.953; | 77 | controlPoint1X = 27.953; |
80 | controlPoint1Y = 36.792; | 78 | controlPoint1Y = 36.792; |
81 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; | 79 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; |
82 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; | 80 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; |
83 | controlPoint2X = 27.677; | 81 | controlPoint2X = 27.677; |
84 | controlPoint2Y = 36.47; | 82 | controlPoint2Y = 36.47; |
85 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; | 83 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; |
86 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; | 84 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; |
87 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); | 85 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); |
88 | pointX = 27.631; | 86 | pointX = 27.631; |
89 | pointY = 27.546; | 87 | pointY = 27.546; |
90 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 88 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
91 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 89 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
92 | controlPoint1X = 27.631; | 90 | controlPoint1X = 27.631; |
93 | controlPoint1Y = 32.974; | 91 | controlPoint1Y = 32.974; |
94 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; | 92 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; |
95 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; | 93 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; |
96 | controlPoint2X = 27.631; | 94 | controlPoint2X = 27.631; |
97 | controlPoint2Y = 29.892; | 95 | controlPoint2Y = 29.892; |
98 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; | 96 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; |
99 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; | 97 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; |
100 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); | 98 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); |
101 | pointX = 27.677; | 99 | pointX = 27.677; |
102 | pointY = 19.726; | 100 | pointY = 19.726; |
103 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 101 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
104 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 102 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
105 | controlPoint1X = 27.631; | 103 | controlPoint1X = 27.631; |
106 | controlPoint1Y = 24.97; | 104 | controlPoint1Y = 24.97; |
107 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; | 105 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; |
108 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; | 106 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; |
109 | controlPoint2X = 27.677; | 107 | controlPoint2X = 27.677; |
110 | controlPoint2Y = 21.612; | 108 | controlPoint2Y = 21.612; |
111 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; | 109 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; |
112 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; | 110 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; |
113 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); | 111 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); |
114 | pointX = 19.535; | 112 | pointX = 19.535; |
115 | pointY = 21.336; | 113 | pointY = 21.336; |
116 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 114 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
117 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 115 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
118 | controlPoint1X = 25.331; | 116 | controlPoint1X = 25.331; |