MCPcopy Create free account
hub / github.com/Theverat/NormalmapGenerator / convertToQImage

Method convertToQImage

src_generators/intensitymap.cpp:133–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133QImage IntensityMap::convertToQImage() const {
134 QImage result(this->getWidth(), this->getHeight(), QImage::Format_ARGB32);
135
136 for(int y = 0; y < this->getHeight(); y++) {
137 QRgb *scanline = (QRgb*) result.scanLine(y);
138
139 for(int x = 0; x < this->getWidth(); x++) {
140 const int c = 255 * map.at(y).at(x);
141 scanline[x] = qRgba(c, c, c, 255);
142 }
143 }
144
145 return result;
146}

Callers 4

loadMethod · 0.80
calcNormalMethod · 0.80
calcDisplaceMethod · 0.80

Calls 3

getWidthMethod · 0.95
getHeightMethod · 0.95
atMethod · 0.80

Tested by

no test coverage detected