mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Render text to pixmap, not qimage
This commit is contained in:
parent
d26b54c7d7
commit
8f2fddfc5a
@ -1404,8 +1404,8 @@ QPixmap OverlayUser::createPixmap(const QString &string, unsigned int height, un
|
||||
int w = iroundf(qr.width() + 2 * edge + 0.5f);
|
||||
int h = iroundf(qr.height() + 2 * edge + 0.5f);
|
||||
|
||||
QImage img(w, h, QImage::Format_ARGB32);
|
||||
img.fill(0);
|
||||
QPixmap img(w, h);
|
||||
img.fill(Qt::transparent);
|
||||
|
||||
QPainter imgp(&img);
|
||||
imgp.setRenderHint(QPainter::Antialiasing);
|
||||
@ -1423,7 +1423,7 @@ QPixmap OverlayUser::createPixmap(const QString &string, unsigned int height, un
|
||||
imgp.setPen(Qt::NoPen);
|
||||
imgp.drawPath(pp);
|
||||
|
||||
return QPixmap::fromImage(img);
|
||||
return img;
|
||||
}
|
||||
|
||||
void OverlayUser::updateUser() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user