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

Method Blit

src/bitmap.cpp:614–628  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

612} // anonymous namespace
613
614void Bitmap::Blit(int x, int y, Bitmap const& src, Rect const& src_rect, Opacity const& opacity, Bitmap::BlendMode blend_mode) {
615 if (opacity.IsTransparent()) {
616 return;
617 }
618
619 auto mask = CreateMask(opacity, src_rect);
620
621 pixman_image_composite32(src.GetOperator(mask.get(), blend_mode),
622 src.bitmap.get(),
623 mask.get(), bitmap.get(),
624 src_rect.x, src_rect.y,
625 0, 0,
626 x, y,
627 src_rect.width, src_rect.height);
628}
629
630void Bitmap::BlitFast(int x, int y, Bitmap const & src, Rect const & src_rect, Opacity const & opacity) {
631 if (opacity.IsTransparent()) {

Callers 15

DrawMethod · 0.80
DrawMethod · 0.80
DrawMethod · 0.80
RefreshMethod · 0.80
OnCharsetSpriteReadyMethod · 0.80
OnFaceReadyMethod · 0.80
DrawGaugeMethod · 0.80
DrawMethod · 0.80
RefreshFrameMethod · 0.80
RefreshCursorMethod · 0.80
DrawSandParticlesMethod · 0.80
HueChangeBlitMethod · 0.80

Calls 4

CreateMaskFunction · 0.85
GetOperatorMethod · 0.80
IsTransparentMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected