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

Method GetSubimage

src/bitmap.cpp:644–648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

642}
643
644PixmanImagePtr Bitmap::GetSubimage(Bitmap const& src, const Rect& src_rect) {
645 uint8_t* pixels = (uint8_t*) src.pixels() + src_rect.x * src.bpp() + src_rect.y * src.pitch();
646 return PixmanImagePtr{ pixman_image_create_bits(src.pixman_format, src_rect.width, src_rect.height,
647 (uint32_t*) pixels, src.pitch()) };
648}
649
650void Bitmap::TiledBlit(Rect const& src_rect, Bitmap const& src, Rect const& dst_rect, Opacity const& opacity, Bitmap::BlendMode blend_mode) {
651 TiledBlit(0, 0, src_rect, src, dst_rect, opacity, blend_mode);

Callers

nothing calls this directly

Calls 3

pixelsMethod · 0.80
bppMethod · 0.80
pitchMethod · 0.80

Tested by

no test coverage detected