MCPcopy Create free account
hub / github.com/KDAB/GammaRay / tintedImage

Method tintedImage

ui/uiresources.cpp:167–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167QImage UIResources::tintedImage(const QImage &image, const QColor &color)
168{
169 QImage img(image.size(), QImage::Format_ARGB32_Premultiplied);
170
171 QPainter painter(&img);
172 painter.setCompositionMode(QPainter::CompositionMode_Source);
173 painter.drawImage(img.rect(), image);
174 painter.setCompositionMode(QPainter::CompositionMode_SourceIn);
175 painter.fillRect(img.rect(), color);
176 return img;
177}
178
179QPixmap UIResources::tintedPixmap(const QImage &image, const QColor &color)
180{

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
drawImageMethod · 0.45
fillRectMethod · 0.45

Tested by

no test coverage detected