MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / Window__flipBitmap

Function Window__flipBitmap

src/override/Window.cpp:542–550  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

540
541#ifdef CARDINAL_WINDOW_CAN_GENERATE_SCREENSHOTS
542static void Window__flipBitmap(uint8_t* pixels, const int width, const int height, const int depth) {
543 for (int y = 0; y < height / 2; y++) {
544 const int flipY = height - y - 1;
545 uint8_t tmp[width * depth];
546 std::memcpy(tmp, &pixels[y * width * depth], width * depth);
547 std::memmove(&pixels[y * width * depth], &pixels[flipY * width * depth], width * depth);
548 std::memcpy(&pixels[flipY * width * depth], tmp, width * depth);
549 }
550}
551
552
553#ifdef STBI_WRITE_NO_STDIO

Callers 1

Window.cppFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected