MCPcopy Create free account
hub / github.com/OpenImageDebugger/OpenImageDebugger / has_nonzero_alpha

Function has_nonzero_alpha

tests/host/ui/svg_raster_test.cpp:36–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34namespace {
35
36bool has_nonzero_alpha(const std::vector<unsigned char>& rgba) {
37 for (std::size_t i = 3; i < rgba.size(); i += 4) {
38 if (rgba[i] != 0) {
39 return true;
40 }
41 }
42 return false;
43}
44
45TEST(SvgRaster, ChannelIconRasterizesAtQtSize) {
46 // The legacy Qt frontend drew channel icons at 10x10 logical (see tag

Callers 1

TESTFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected