Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/exclamationMark.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/exclamationMark.js | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/exclamationMark.js b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/exclamationMark.js index 02f2f80..5982f0d 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/exclamationMark.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Canvas/Marks/exclamationMark.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 | //exclamationMark.js | 25 | //exclamationMark.js |
28 | //! | 26 | //! |
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_exclamationMarkWidth = 50.0; | 33 | var kClipperz_PM_UI_Canvas_Marks_exclamationMarkWidth = 50.0; |
36 | var kClipperz_PM_UI_Canvas_Marks_exclamationMarkHeight = 50.0; | 34 | var kClipperz_PM_UI_Canvas_Marks_exclamationMarkHeight = 50.0; |
37 | 35 | ||
38 | function Clipperz_PM_UI_Canvas_Marks_exclamationMark(canvas, aColor) | 36 | function Clipperz_PM_UI_Canvas_Marks_exclamationMark(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 | if (window.devicePixelRatio) | 48 | if (window.devicePixelRatio) |
51 | resolution = window.devicePixelRatio; | 49 | resolution = window.devicePixelRatio; |
52 | else | 50 | else |
53 | resolution = 1.0; | 51 | resolution = 1.0; |
54 | resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_Marks_exclamationMarkWidth + canvas.height / kClipperz_PM_UI_Canvas_Marks_exclamationMarkHeight); | 52 | resolution *= 0.5 * (canvas.width / kClipperz_PM_UI_Canvas_Marks_exclamationMarkWidth + canvas.height / kClipperz_PM_UI_Canvas_Marks_exclamationMarkHeight); |
55 | 53 | ||
56 | context.save(); | 54 | context.save(); |
57 | context.scale(canvas.width / kClipperz_PM_UI_Canvas_Marks_exclamationMarkWidth, canvas.height / kClipperz_PM_UI_Canvas_Marks_exclamationMarkHeight); | 55 | context.scale(canvas.width / kClipperz_PM_UI_Canvas_Marks_exclamationMarkWidth, canvas.height / kClipperz_PM_UI_Canvas_Marks_exclamationMarkHeight); |
58 | context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Marks_exclamationMarkWidth, kClipperz_PM_UI_Canvas_Marks_exclamationMarkHeight); | 56 | context.clearRect(0.0, 0.0, kClipperz_PM_UI_Canvas_Marks_exclamationMarkWidth, kClipperz_PM_UI_Canvas_Marks_exclamationMarkHeight); |
59 | 57 | ||
60 | // Layer 1 | 58 | // Layer 1 |
61 | 59 | ||
62 | alignStroke = 0.0; | 60 | alignStroke = 0.0; |
63 | context.beginPath(); | 61 | context.beginPath(); |
64 | pointX = 26.499; | 62 | pointX = 26.499; |
65 | pointY = 10.848; | 63 | pointY = 10.848; |
66 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 64 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
67 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 65 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
68 | context.moveTo(pointX, pointY); | 66 | context.moveTo(pointX, pointY); |
69 | pointX = 20.887; | 67 | pointX = 20.887; |
70 | pointY = 11.584; | 68 | pointY = 11.584; |
71 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 69 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
72 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 70 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
73 | controlPoint1X = 25.395; | 71 | controlPoint1X = 25.395; |
74 | controlPoint1Y = 10.802; | 72 | controlPoint1Y = 10.802; |
75 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; | 73 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; |
76 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; | 74 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; |
77 | controlPoint2X = 22.175; | 75 | controlPoint2X = 22.175; |
78 | controlPoint2Y = 11.078; | 76 | controlPoint2Y = 11.078; |
79 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; | 77 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; |
80 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; | 78 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; |
81 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); | 79 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); |
82 | pointX = 20.013; | 80 | pointX = 20.013; |
83 | pointY = 13.194; | 81 | pointY = 13.194; |
84 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 82 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
85 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 83 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
86 | controlPoint1X = 20.335; | 84 | controlPoint1X = 20.335; |
87 | controlPoint1Y = 11.814; | 85 | controlPoint1Y = 11.814; |
88 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; | 86 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; |
89 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; | 87 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; |
90 | controlPoint2X = 19.921; | 88 | controlPoint2X = 19.921; |
91 | controlPoint2Y = 12.826; | 89 | controlPoint2Y = 12.826; |
92 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; | 90 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; |
93 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; | 91 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; |
94 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); | 92 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); |
95 | pointX = 23.049; | 93 | pointX = 23.049; |
96 | pointY = 28.788; | 94 | pointY = 28.788; |
97 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 95 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
98 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 96 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
99 | controlPoint1X = 20.243; | 97 | controlPoint1X = 20.243; |
100 | controlPoint1Y = 15.448; | 98 | controlPoint1Y = 15.448; |
101 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; | 99 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; |
102 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; | 100 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; |
103 | controlPoint2X = 22.589; | 101 | controlPoint2X = 22.589; |
104 | controlPoint2Y = 26.35; | 102 | controlPoint2Y = 26.35; |
105 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; | 103 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; |
106 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; | 104 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; |
107 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); | 105 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); |
108 | pointX = 25.027; | 106 | pointX = 25.027; |
109 | pointY = 29.156; | 107 | pointY = 29.156; |
110 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 108 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
111 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 109 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
112 | controlPoint1X = 23.279; | 110 | controlPoint1X = 23.279; |
113 | controlPoint1Y = 29.018; | 111 | controlPoint1Y = 29.018; |
114 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; | 112 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; |
115 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; | 113 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; |
116 | controlPoint2X = 24.705; | 114 | controlPoint2X = 24.705; |
117 | controlPoint2Y = 29.202; | 115 | controlPoint2Y = 29.202; |
118 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; | 116 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; |