MCPcopy Create free account
hub / github.com/admtrv/objcurses / Buffer

Method Buffer

entities/rendering/buffer.cpp:74–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72// Buffer methods
73
74Buffer::Buffer(const unsigned int x, const unsigned int y, const float logical_x, const float logical_y) : x(x), y(y), logical_x(logical_x), logical_y(logical_y)
75{
76 if (x == 0 || y == 0)
77 {
78 throw std::runtime_error("zero buffer size");
79 }
80
81 dx = logical_x / static_cast<float>(x);
82 dy = logical_y / static_cast<float>(y);
83
84 pixels.resize(x * y);
85
86 clear();
87}
88
89void Buffer::clear()
90{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected