MCPcopy Create free account
hub / github.com/davisking/dlib / fill

Method fill

dlib/gui_core/gui_core_kernel_2.cpp:1315–1336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1313// ----------------------------------------------------------------------------------------
1314
1315 void canvas::
1316 fill (
1317 unsigned char red_,
1318 unsigned char green_,
1319 unsigned char blue_
1320 ) const
1321 {
1322 pixel pixel_value;
1323 pixel_value.red = red_;
1324 pixel_value.green = green_;
1325 pixel_value.blue = blue_;
1326 pixel_value._padding = 0;
1327
1328 pixel* start = reinterpret_cast<pixel*>(bits);
1329 pixel* end = start + width_*height_;
1330
1331 while (start != end)
1332 {
1333 *start = pixel_value;
1334 ++start;
1335 }
1336 }
1337
1338// ----------------------------------------------------------------------------------------
1339

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected