45
45
dstr, dstg, dstb, dsta := dst.RGBA()
46
46
srcr, srcg, srcb, srca := src.RGBA()
47
47
_, _, _, m := mask.RGBA()
49
49
// The resultant red value is a blend of dstr and srcr, and ranges in [0, M].
50
50
// The calculation for green, blue and alpha is similar.
51
51
dstr = (dstr*(M-m) + srcr*m) / M