MCPcopy Create free account
hub / github.com/KLayout/klayout / to_string

Function to_string

src/laybasic/unit_tests/layBitmapsToImage.cc:30–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28#include "tlUnitTest.h"
29
30std::string
31to_string (const tl::PixelBuffer &img, unsigned int mask)
32{
33 std::string s;
34 for (unsigned int i = 0; i < 32; ++i) {
35 const unsigned int *data = (const unsigned int *)img.scan_line (i);
36 for (unsigned int j = 0; j < 32; ++j) {
37 s += (data[j] & mask) ? "x" : ".";
38 }
39 s += "\n";
40 }
41 return s;
42}
43
44TEST(1)
45{

Callers 1

Calls 1

scan_lineMethod · 0.80

Tested by

no test coverage detected