MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / fill

Method fill

source/core/StarImage.cpp:282–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282void Image::fill(Vec3B const& c) {
283 if (bitsPerPixel() == 24) {
284 for (unsigned y = 0; y < m_height; ++y)
285 for (unsigned x = 0; x < m_width; ++x)
286 set24(x, y, c);
287 } else {
288 for (unsigned y = 0; y < m_height; ++y)
289 for (unsigned x = 0; x < m_width; ++x)
290 set32(x, y, Vec4B(c, 255));
291 }
292}
293
294void Image::fill(Vec4B const& c) {
295 if (bitsPerPixel() == 24) {

Callers 10

refreshWearablesMethod · 0.45
streamStateFromFormatFunction · 0.45
formatImplFunction · 0.45
defineObjectOrientationFunction · 0.45
scanLiquidsFunction · 0.45
resetMethod · 0.45
renderMethod · 0.45
filledMethod · 0.45
filledMethod · 0.45

Calls 2

bitsPerPixelFunction · 0.85
vec3Method · 0.80

Tested by

no test coverage detected