| 72 | // Buffer methods |
| 73 | |
| 74 | Buffer::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 | |
| 89 | void Buffer::clear() |
| 90 | { |
nothing calls this directly
no outgoing calls
no test coverage detected