MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / test_agg

Function test_agg

tests/agg.cc:7–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <assert.h>
6
7static void test_agg(void)
8{
9 const int WIDTH = 640;
10 const int HEIGHT = 480;
11 const int DEPTH = 4;
12 const int STRIDE = WIDTH * DEPTH;
13
14 std::vector<uint8_t> data(STRIDE * HEIGHT, 255);
15
16 Agg2D painter;
17 painter.attach(&data[0], WIDTH, HEIGHT, STRIDE);
18 painter.line(0, 0, WIDTH, HEIGHT);
19
20 stbi_write_png("/tmp/test.png", WIDTH, HEIGHT, 4, &data[0], STRIDE);
21}
22
23int main(int argc, const char* argv[])
24{

Callers 1

mainFunction · 0.85

Calls 2

attachMethod · 0.45
lineMethod · 0.45

Tested by

no test coverage detected