MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / solidRGBA

Function solidRGBA

tests/unit/engine/Poseidon/Graphics/test_image.cpp:17–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15// --- Helper: create solid-color RGBA test image ---
16
17static std::vector<uint8_t> solidRGBA(int w, int h, uint8_t r, uint8_t g, uint8_t b, uint8_t a)
18{
19 std::vector<uint8_t> data(w * h * 4);
20 for (int i = 0; i < w * h; ++i)
21 {
22 data[i * 4 + 0] = r;
23 data[i * 4 + 1] = g;
24 data[i * 4 + 2] = b;
25 data[i * 4 + 3] = a;
26 }
27 return data;
28}
29
30// --- Helper: gradient RGBA test image ---
31

Callers 1

test_image.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected