MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / MakeSingleColorImage

Function MakeSingleColorImage

src/qt/platformstyle.cpp:33–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31/* Local functions for colorizing single-color images */
32
33void MakeSingleColorImage(QImage& img, const QColor& colorbase)
34{
35 img = img.convertToFormat(QImage::Format_ARGB32);
36 for (int x = img.width(); x--; )
37 {
38 for (int y = img.height(); y--; )
39 {
40 const QRgb rgb = img.pixel(x, y);
41 img.setPixel(x, y, qRgba(colorbase.red(), colorbase.green(), colorbase.blue(), qAlpha(rgb)));
42 }
43 }
44}
45
46QIcon ColorizeIcon(const QIcon& ico, const QColor& colorbase)
47{

Callers 2

ColorizeIconFunction · 0.85
ColorizeImageFunction · 0.85

Calls 1

heightMethod · 0.80

Tested by

no test coverage detected