OLD | NEW |
1 description("Series of tests to ensure correct results on applying different ble
nd modes."); | 1 description("Series of tests to ensure correct results on applying different ble
nd modes."); |
2 | 2 |
3 var tmpimg = document.createElement('canvas'); | 3 var tmpimg = document.createElement('canvas'); |
4 tmpimg.width = 200; | 4 tmpimg.width = 200; |
5 tmpimg.height = 200; | 5 tmpimg.height = 200; |
6 ctx = tmpimg.getContext('2d'); | 6 ctx = tmpimg.getContext('2d'); |
7 | 7 |
8 // Create the image for blending test with images. | 8 // Create the image for blending test with images. |
9 var img = document.createElement('canvas'); | 9 var img = document.createElement('canvas'); |
10 img.width = 200; | 10 img.width = 200; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 ], | 62 ], |
63 ['color-dodge', | 63 ['color-dodge', |
64 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]], | 64 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]], |
65 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]], | 65 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]], |
66 [[128, 0, 127, 255],[128, 128, 127, 255],[0, 64, 127, 255],[0, 0, 255,
255]], | 66 [[128, 0, 127, 255],[128, 128, 127, 255],[0, 64, 127, 255],[0, 0, 255,
255]], |
67 [[85, 0, 170, 191],[85, 85, 170, 191],[0, 43, 170, 191],[0, 0, 255, 191
]] | 67 [[85, 0, 170, 191],[85, 85, 170, 191],[0, 43, 170, 191],[0, 0, 255, 191
]] |
68 ], | 68 ], |
69 ['color-burn', | 69 ['color-burn', |
70 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]], | 70 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]], |
71 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]], | 71 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]], |
72 » [[128, 0, 127, 255],[128, 128, 127, 255],[0, 0, 127, 255],[0, 0, 255, 2
55]], | 72 » [[128, 0, 127, 255],[128, 128, 127, 255],[0, 64, 127, 255],[0, 0, 255,
255]], |
73 » [[85, 0, 170, 191],[85, 85, 170, 191],[0, 0, 170, 191],[0, 0, 255, 191]
] | 73 » [[85, 0, 170, 191],[85, 85, 170, 191],[0, 42, 170, 191],[0, 0, 255, 191
]] |
74 | 74 |
75 ], | 75 ], |
76 ['hard-light', | 76 ['hard-light', |
77 [[255, 0, 0, 255],[255, 255, 0, 255],[0, 1, 0, 255],[0, 0, 255, 255]], | 77 [[255, 0, 0, 255],[255, 255, 0, 255],[0, 1, 0, 255],[0, 0, 255, 255]], |
78 [[128, 0, 127, 255],[128, 128, 127, 255],[0, 0, 127, 255],[0, 0, 255, 2
55]], | 78 [[128, 0, 127, 255],[128, 128, 127, 255],[0, 0, 127, 255],[0, 0, 255, 2
55]], |
79 [[255, 0, 0, 255],[255, 255, 0, 255],[0, 65, 0, 255],[0, 0, 255, 255]], | 79 [[255, 0, 0, 255],[255, 255, 0, 255],[0, 65, 0, 255],[0, 0, 255, 255]], |
80 [[171, 0, 84, 191],[171, 171, 84, 191],[0, 43, 84, 191],[0, 0, 255, 191
]] | 80 [[171, 0, 84, 191],[171, 171, 84, 191],[0, 43, 84, 191],[0, 0, 255, 191
]] |
81 ], | 81 ], |
82 ['soft-light', | 82 ['soft-light', |
83 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]], | 83 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]], |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 178 |
179 checkBlendModeResult(blendModes[i][0], testScenario[j][0], blendModes[
i][j+1], sigma); | 179 checkBlendModeResult(blendModes[i][0], testScenario[j][0], blendModes[
i][j+1], sigma); |
180 ctx.restore(); | 180 ctx.restore(); |
181 } | 181 } |
182 debug(''); | 182 debug(''); |
183 } | 183 } |
184 } | 184 } |
185 | 185 |
186 // Run test and allow variation of results. | 186 // Run test and allow variation of results. |
187 prepareTestScenario(5); | 187 prepareTestScenario(5); |
OLD | NEW |