| 291 | } |
| 292 | |
| 293 | Color Bitmap::GetColorAt(int x, int y) const { |
| 294 | if (x < 0 || x >= width() || y < 0 || y >= height()) { |
| 295 | return {}; |
| 296 | } |
| 297 | |
| 298 | Color color; |
| 299 | |
| 300 | const uint8_t* pos = &reinterpret_cast<const uint8_t*>(pixels())[y * pitch() + x * bpp()]; |
| 301 | uint32_t pixel = *reinterpret_cast<const uint32_t*>(pos); |
| 302 | format.uint32_to_rgba(pixel, color.red, color.green, color.blue, color.alpha); |
| 303 | |
| 304 | return color; |
| 305 | } |
| 306 | |
| 307 | void Bitmap::HueChangeBlit(int x, int y, Bitmap const& src, Rect const& src_rect_, double hue_) { |
| 308 | Rect dst_rect(x, y, 0, 0), src_rect = src_rect_; |
no test coverage detected