| 222 | } |
| 223 | |
| 224 | void UnsafeDrawBorder2px(const Surface &out, Rectangle rect, uint8_t color) |
| 225 | { |
| 226 | const size_t width = rect.size.width; |
| 227 | const size_t height = rect.size.height; |
| 228 | uint8_t *buf = &out[rect.position]; |
| 229 | std::memset(buf, color, width); |
| 230 | buf += out.pitch(); |
| 231 | std::memset(buf, color, width); |
| 232 | buf += out.pitch(); |
| 233 | for (size_t i = 4; i < height; ++i) { |
| 234 | buf[0] = buf[1] = color; |
| 235 | buf[width - 2] = buf[width - 1] = color; |
| 236 | buf += out.pitch(); |
| 237 | } |
| 238 | std::memset(buf, color, width); |
| 239 | buf += out.pitch(); |
| 240 | std::memset(buf, color, width); |
| 241 | } |
| 242 | |
| 243 | } // namespace devilution |
no test coverage detected