| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 ['hue', | 98 ['hue', |
| 99 [[93, 0, 0, 255],[31, 31, 0, 255],[0, 46, 0, 255],[0, 0, 255, 255]], | 99 [[93, 0, 0, 255],[31, 31, 0, 255],[0, 46, 0, 255],[0, 0, 255, 255]], |
| 100 [[49, 0, 127, 255],[16, 16, 127, 255],[0, 25, 127, 255],[0, 0, 255, 255
]], | 100 [[49, 0, 127, 255],[16, 16, 127, 255],[0, 25, 127, 255],[0, 0, 255, 255
]], |
| 101 [[175, 0, 0, 255],[144, 144, 0, 255],[0, 88, 0, 255],[0, 0, 255, 255]], | 101 [[175, 0, 0, 255],[144, 144, 0, 255],[0, 88, 0, 255],[0, 0, 255, 255]], |
| 102 [[116, 0, 84, 191],[96, 96, 84, 191],[0, 58, 84, 191],[0, 0, 255, 191]] | 102 [[116, 0, 84, 191],[96, 96, 84, 191],[0, 58, 84, 191],[0, 0, 255, 191]] |
| 103 ], | 103 ], |
| 104 ['saturation', | 104 ['saturation', |
| 105 [[0, 0, 255, 255],[0, 0, 255, 255],[14, 14, 142, 255],[0, 0, 255, 255]]
, | 105 [[0, 0, 255, 255],[0, 0, 255, 255],[14, 14, 142, 255],[0, 0, 255, 255]]
, |
| 106 [[0, 0, 255, 255],[0, 0, 255, 255],[7, 7, 198, 255],[0, 0, 255, 255]], | 106 [[0, 0, 255, 255],[0, 0, 255, 255],[7, 7, 198, 255],[0, 0, 255, 255]], |
| 107 [[128, 0, 127, 255],[128, 128, 127, 255],[7, 71, 70, 255],[0, 0, 255, 2
55]], | 107 [[128, 0, 127, 255],[128, 128, 127, 255],[7, 71, 70, 255],[0, 0, 255, 2
55]], |
| 108 » [[85, 0, 167, 191],[85, 85, 167, 191],[0, 48, 130, 191],[0, 0, 255, 191
]] | 108 » [[85, 0, 167, 191],[85, 85, 167, 191],[4, 48, 130, 191],[0, 0, 255, 191
]] |
| 109 ], | 109 ], |
| 110 ['color', | 110 ['color', |
| 111 [[93, 0, 0, 255],[31, 31, 0, 255],[0, 47, 0, 255],[0, 0, 255, 255]], | 111 [[93, 0, 0, 255],[31, 31, 0, 255],[0, 47, 0, 255],[0, 0, 255, 255]], |
| 112 [[49, 0, 127, 255],[16, 16, 127, 255],[0, 24, 127, 255],[0, 0, 255, 255
]], | 112 [[49, 0, 127, 255],[16, 16, 127, 255],[0, 24, 127, 255],[0, 0, 255, 255
]], |
| 113 [[175, 0, 0, 255],[144, 144, 0, 255],[0, 88, 0, 255],[0, 0, 255, 255]], | 113 [[175, 0, 0, 255],[144, 144, 0, 255],[0, 88, 0, 255],[0, 0, 255, 255]], |
| 114 [[116, 0, 84, 191],[96, 96, 84, 191],[0, 58, 84, 191],[0, 0, 255, 191]] | 114 [[116, 0, 84, 191],[96, 96, 84, 191],[0, 58, 84, 191],[0, 0, 255, 191]] |
| 115 ], | 115 ], |
| 116 ['luminosity', | 116 ['luminosity', |
| 117 [[55, 55, 255, 255],[224, 224, 255, 255],[54, 54, 255, 255],[0, 0, 255,
255]], | 117 [[55, 55, 255, 255],[224, 224, 255, 255],[54, 54, 255, 255],[0, 0, 255,
255]], |
| 118 [[28, 28, 255, 255],[112, 112, 255, 255],[27, 27, 255, 255],[0, 0, 255,
255]], | 118 [[28, 28, 255, 255],[112, 112, 255, 255],[27, 27, 255, 255],[0, 0, 255,
255]], |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 166 |
| 167 checkBlendModeResult(blendModes[i][0], testScenario[j][0], blendModes[
i][j+1], sigma); | 167 checkBlendModeResult(blendModes[i][0], testScenario[j][0], blendModes[
i][j+1], sigma); |
| 168 ctx.restore(); | 168 ctx.restore(); |
| 169 } | 169 } |
| 170 debug(''); | 170 debug(''); |
| 171 } | 171 } |
| 172 } | 172 } |
| 173 | 173 |
| 174 // Run test and allow variation of results. | 174 // Run test and allow variation of results. |
| 175 prepareTestScenario(5); | 175 prepareTestScenario(5); |
| OLD | NEW |