| 1094 | } |
| 1095 | |
| 1096 | void Bitmap::MaskedBlit(Rect const& dst_rect, Bitmap const& mask, int mx, int my, Color const& color) { |
| 1097 | pixman_color_t tcolor = { |
| 1098 | static_cast<uint16_t>(color.red << 8), |
| 1099 | static_cast<uint16_t>(color.green << 8), |
| 1100 | static_cast<uint16_t>(color.blue << 8), |
| 1101 | static_cast<uint16_t>(color.alpha << 8)}; |
| 1102 | |
| 1103 | auto source = PixmanImagePtr{ pixman_image_create_solid_fill(&tcolor) }; |
| 1104 | |
| 1105 | pixman_image_composite32(PIXMAN_OP_OVER, |
| 1106 | source.get(), mask.bitmap.get(), bitmap.get(), |
| 1107 | 0, 0, |
| 1108 | mx, my, |
| 1109 | dst_rect.x, dst_rect.y, |
| 1110 | dst_rect.width, dst_rect.height); |
| 1111 | } |
| 1112 | |
| 1113 | void Bitmap::MaskedBlit(Rect const& dst_rect, Bitmap const& mask, int mx, int my, Bitmap const& src, int sx, int sy) { |
| 1114 | pixman_image_composite32(PIXMAN_OP_OVER, |
no test coverage detected