Qt::ImageConversionFlags flags)
{
QRectF baseSize
(0,
0, image.
width(), image.
height());
if (baseSize != sr)
im = im.copy(qFloor(sr.x()), qFloor(sr.y()),
qCeil(sr.width()), qCeil(sr.height()));
if (im.depth() == 1)
im
= im.
convertToFormat(QImage::Format_RGB32);
}
void QPaintEngine::drawImage(const QRectF &r, const QImage &image, const QRectF &sr,
Qt::ImageConversionFlags flags)
{
QRectF baseSize(0, 0, image.width(), image.height());
QImage im = image;
if (baseSize != sr)
im = im.copy(qFloor(sr.x()), qFloor(sr.y()),
qCeil(sr.width()), qCeil(sr.height()));
if (im.depth() == 1)
im = im.convertToFormat(QImage::Format_RGB32);
QPixmap pm = QPixmap::fromImage(im, flags);
drawPixmap(r, pm, QRectF(QPointF(0, 0), pm.size()));
}
To copy to clipboard, switch view to plain text mode
Bookmarks