MCPcopy Create free account
hub / github.com/VCVRack/Rack / flipBitmap

Function flipBitmap

src/window/Window.cpp:544–552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

542
543
544static void flipBitmap(uint8_t* pixels, int width, int height, int depth) {
545 for (int y = 0; y < height / 2; y++) {
546 int flipY = height - y - 1;
547 uint8_t tmp[width * depth];
548 std::memcpy(tmp, &pixels[y * width * depth], width * depth);
549 std::memcpy(&pixels[y * width * depth], &pixels[flipY * width * depth], width * depth);
550 std::memcpy(&pixels[flipY * width * depth], tmp, width * depth);
551 }
552}
553
554
555void Window::screenshot(const std::string& screenshotPath) {

Callers 2

screenshotMethod · 0.85
screenshotModulesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected