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

Method ClearRect

src/bitmap.cpp:781–794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

779}
780
781void Bitmap::ClearRect(Rect const& dst_rect) {
782 pixman_color_t pcolor = {};
783 pixman_box32_t box = {
784 dst_rect.x,
785 dst_rect.y,
786 dst_rect.x + dst_rect.width,
787 dst_rect.y + dst_rect.height
788 };
789
790 box.x2 = Utils::Clamp<int32_t>(box.x2, 0, width());
791 box.y2 = Utils::Clamp<int32_t>(box.y2, 0, height());
792
793 pixman_image_fill_boxes(PIXMAN_OP_CLEAR, bitmap.get(), &pcolor, 1, &box);
794}
795
796// Hard light lookup table mapping source color to destination color
797// FIXME: Replace this with std::array<std::array<uint8_t,256>,256> when we have C++17

Callers 15

DrawCmdLinesMethod · 0.80
RefreshMethod · 0.80
DrawOptionMethod · 0.80
RefreshMethod · 0.80
DrawTextOnLogoMethod · 0.80
DrawItemMethod · 0.80
RefreshMethod · 0.80
DrawItemMethod · 0.80
DrawItemMethod · 0.80
RefreshGaugeMethod · 0.80
DrawItemMethod · 0.80
DrawDescriptionLinesMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected