MCPcopy Create free account
hub / github.com/EasyRPG/Player / ZoomOpacityBlit

Method ZoomOpacityBlit

src/bitmap.cpp:1211–1226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1209}
1210
1211void Bitmap::ZoomOpacityBlit(int x, int y, int ox, int oy,
1212 Bitmap const& src, Rect const& src_rect,
1213 double zoom_x, double zoom_y,
1214 Opacity const& opacity, Bitmap::BlendMode blend_mode)
1215{
1216 if (opacity.IsTransparent()) {
1217 return;
1218 }
1219
1220 Rect dst_rect(
1221 x - static_cast<int>(std::floor(ox * zoom_x)),
1222 y - static_cast<int>(std::floor(oy * zoom_y)),
1223 static_cast<int>(std::floor(src_rect.width * zoom_x)),
1224 static_cast<int>(std::floor(src_rect.height * zoom_y)));
1225 StretchBlit(dst_rect, src, src_rect, opacity, blend_mode);
1226}
1227
1228pixman_op_t Bitmap::GetOperator(pixman_image_t* mask, Bitmap::BlendMode blend_mode) const {
1229 if (blend_mode != BlendMode::Default) {

Callers 3

TakeScreenshotMethod · 0.80
RenderImplMethod · 0.80
BM_ZoomOpacityBlitFunction · 0.80

Calls 1

IsTransparentMethod · 0.45

Tested by

no test coverage detected