Creates an image with a solid background color
| 264 | |
| 265 | // Creates an image with a solid background color |
| 266 | std::unique_ptr<wxImage> CreateBackground(int width, int height, wxColour colour) |
| 267 | { |
| 268 | auto i = std::make_unique<wxImage>(width, height); |
| 269 | unsigned char *ip; |
| 270 | int srcVal[3]; |
| 271 | int x; |
| 272 | |
| 273 | srcVal[0] = colour.Red(); |
| 274 | srcVal[1] = colour.Green(); |
| 275 | srcVal[2] = colour.Blue(); |
| 276 | |
| 277 | ip = i->GetData(); |
| 278 | for(x=0; x<width*height; x++) { |
| 279 | *ip++ = srcVal[0]; |
| 280 | *ip++ = srcVal[1]; |
| 281 | *ip++ = srcVal[2]; |
| 282 | } |
| 283 | |
| 284 | return i; |
| 285 | } |
| 286 | |
| 287 | std::unique_ptr<wxImage> CreateSysBackground |
| 288 | (int width, int height, int WXUNUSED(offset), wxColour colour) |
no test coverage detected