| 126 | void *PaletteImageLock::getData() { return this->img->indices.get(); } |
| 127 | |
| 128 | void PaletteImage::calculateBounds() |
| 129 | { |
| 130 | unsigned int minX = this->size.x, minY = this->size.y, maxX = 0, maxY = 0; |
| 131 | |
| 132 | for (unsigned int y = 0; y < this->size.y; y++) |
| 133 | { |
| 134 | for (unsigned int x = 0; x < this->size.x; x++) |
| 135 | { |
| 136 | unsigned int offset = y * this->size.x + x; |
| 137 | if (this->indices[offset]) |
| 138 | { |
| 139 | if (minX > x) |
| 140 | minX = x; |
| 141 | if (minY > y) |
| 142 | minY = y; |
| 143 | if (maxX < x) |
| 144 | maxX = x; |
| 145 | if (maxY < y) |
| 146 | maxY = y; |
| 147 | } |
| 148 | } |
| 149 | } |
| 150 | this->bounds = {minX, minY, maxX, maxY}; |
| 151 | } |
| 152 | |
| 153 | LazyImage::LazyImage() : Image({0, 0}) {} |
| 154 |
no outgoing calls
no test coverage detected