| 1915 | } |
| 1916 | |
| 1917 | Pixel Pixel::operator + (const Pixel& p) const |
| 1918 | { |
| 1919 | uint8_t nR = uint8_t(std::min(255, std::max(0, int(r) + int(p.r)))); |
| 1920 | uint8_t nG = uint8_t(std::min(255, std::max(0, int(g) + int(p.g)))); |
| 1921 | uint8_t nB = uint8_t(std::min(255, std::max(0, int(b) + int(p.b)))); |
| 1922 | return Pixel(nR, nG, nB, a); |
| 1923 | } |
| 1924 | |
| 1925 | Pixel Pixel::operator - (const Pixel& p) const |
| 1926 | { |