summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/UI/Canvas/Tips/open.js
Unidiff
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Canvas/Tips/open.js') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Canvas/Tips/open.js22
1 files changed, 10 insertions, 12 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Tips/open.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Tips/open.js
index 30c1c69..9c76865 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Tips/open.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Tips/open.js
@@ -1,118 +1,116 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer 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 //open.js 25 //open.js
28 //open 26 //open
29// 27//
30 //Created by Giulio Cesare Solaroli on 3/14/10 28 //Created by Giulio Cesare Solaroli on 3/14/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
35var kClipperz_PM_UI_Canvas_Tips_openWidth = 310.0; 33var kClipperz_PM_UI_Canvas_Tips_openWidth = 310.0;
36var kClipperz_PM_UI_Canvas_Tips_openHeight = 6.0; 34var kClipperz_PM_UI_Canvas_Tips_openHeight = 6.0;
37 35
38function Clipperz_PM_UI_Canvas_Tips_open(canvas, aColor, aBackgroundColor) 36function Clipperz_PM_UI_Canvas_Tips_open(canvas, aColor, aBackgroundColor)
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 color; 44 var color;
47 if (window.devicePixelRatio) 45 if (window.devicePixelRatio)
48 resolution = window.devicePixelRatio; 46 resolution = window.devicePixelRatio;
49 else 47 else
50 resolution = 1.0; 48 resolution = 1.0;
51 resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_Tips_openWidth + canvas.height / kClipperz_PM_UI_Canvas_Tips_openHeight); 49 resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_Tips_openWidth + canvas.height / kClipperz_PM_UI_Canvas_Tips_openHeight);
52 50
53 context.save(); 51 context.save();
54 context.scale(canvas.width / kClipperz_PM_UI_Canvas_Tips_openWidth, canvas.height / kClipperz_PM_UI_Canvas_Tips_openHeight); 52 context.scale(canvas.width / kClipperz_PM_UI_Canvas_Tips_openWidth, canvas.height / kClipperz_PM_UI_Canvas_Tips_openHeight);
55 context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Tips_openWidth, kClipperz_PM_UI_Canvas_Tips_openHeight); 53 context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Tips_openWidth, kClipperz_PM_UI_Canvas_Tips_openHeight);
56 54
57 // background 55 // background
58 56
59 alignStroke = 0.0; 57 alignStroke = 0.0;
60 context.beginPath(); 58 context.beginPath();
61 pointX = 310.0; 59 pointX = 310.0;
62 pointY = 6.0; 60 pointY = 6.0;
63 pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; 61 pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution;
64 pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; 62 pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution;
65 context.moveTo(pointX, pointY); 63 context.moveTo(pointX, pointY);
66 pointX = 310.0; 64 pointX = 310.0;
67 pointY = 0.0; 65 pointY = 0.0;
68 pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; 66 pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution;
69 pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; 67 pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution;
70 context.lineTo(pointX, pointY); 68 context.lineTo(pointX, pointY);
71 pointX = 0.0; 69 pointX = 0.0;
72 pointY = 0.0; 70 pointY = 0.0;
73 pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; 71 pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution;
74 pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; 72 pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution;
75 context.lineTo(pointX, pointY); 73 context.lineTo(pointX, pointY);
76 pointX = 0.0; 74 pointX = 0.0;
77 pointY = 6.0; 75 pointY = 6.0;
78 pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; 76 pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution;
79 pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; 77 pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution;
80 context.lineTo(pointX, pointY); 78 context.lineTo(pointX, pointY);
81 pointX = 310.0; 79 pointX = 310.0;
82 pointY = 6.0; 80 pointY = 6.0;
83 pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; 81 pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution;
84 pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; 82 pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution;
85 context.lineTo(pointX, pointY); 83 context.lineTo(pointX, pointY);
86 context.closePath(); 84 context.closePath();
87 context.fillStyle = aBackgroundColor; 85 context.fillStyle = aBackgroundColor;
88 context.fill(); 86 context.fill();
89 87
90 // grid 88 // grid
91 89
92 // background 90 // background
93 91
94 alignStroke = 0.0; 92 alignStroke = 0.0;
95 context.beginPath(); 93 context.beginPath();
96 pointX = 310.0; 94 pointX = 310.0;
97 pointY = 6.0; 95 pointY = 6.0;
98 pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; 96 pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution;
99 pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; 97 pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution;
100 context.moveTo(pointX, pointY); 98 context.moveTo(pointX, pointY);
101 pointX = 310.0; 99 pointX = 310.0;
102 pointY = 0.0; 100 pointY = 0.0;
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 context.lineTo(pointX, pointY); 103 context.lineTo(pointX, pointY);
106 pointX = 0.0; 104 pointX = 0.0;
107 pointY = 0.0; 105 pointY = 0.0;
108 pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; 106 pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution;
109 pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; 107 pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution;
110 context.lineTo(pointX, pointY); 108 context.lineTo(pointX, pointY);
111 pointX = 0.0; 109 pointX = 0.0;
112 pointY = 6.0; 110 pointY = 6.0;
113 pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; 111 pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution;
114 pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; 112 pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution;
115 context.lineTo(pointX, pointY); 113 context.lineTo(pointX, pointY);
116 pointX = 310.0; 114 pointX = 310.0;
117 pointY = 6.0; 115 pointY = 6.0;
118 pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; 116 pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution;