mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-13 16:33:28 -04:00
Add comment about overlay mode being the reverse of hard-light.
This commit is contained in:
parent
3850e4a53b
commit
f58aa2a23b
1 changed files with 1 additions and 0 deletions
|
@ -73,6 +73,7 @@ var BlendMode = {
|
|||
},
|
||||
|
||||
overlay: function(i) {
|
||||
// = Reverse of hard-light
|
||||
// Correct for 100% opacity case; colors get clipped as opacity falls
|
||||
dst[i] = dRA <= 0.5 ? (2 * src[i] * dRA / dA) : 255 - (2 - 2 * dRA / dA) * (255 - src[i]);
|
||||
dst[i + 1] = dGA <= 0.5 ? (2 * src[i + 1] * dGA / dA) : 255 - (2 - 2 * dGA / dA) * (255 - src[i + 1]);
|
||||
|
|
Loading…
Reference in a new issue