| 1923 | } |
| 1924 | |
| 1925 | Pixel Pixel::operator - (const Pixel& p) const |
| 1926 | { |
| 1927 | uint8_t nR = uint8_t(std::min(255, std::max(0, int(r) - int(p.r)))); |
| 1928 | uint8_t nG = uint8_t(std::min(255, std::max(0, int(g) - int(p.g)))); |
| 1929 | uint8_t nB = uint8_t(std::min(255, std::max(0, int(b) - int(p.b)))); |
| 1930 | return Pixel(nR, nG, nB, a); |
| 1931 | } |
| 1932 | |
| 1933 | Pixel& Pixel::operator += (const Pixel& p) |
| 1934 | { |