Seite 1 von 1

Ersatz für bitBlt

Verfasst: 16. Juni 2006 12:17
von Isa
Hallo,

ich hab eine QT-Applikation, die ich mal in Qt 3.xx geschrieben habe und verwende die Funktion bitBlt (QPaintDevice). Jetzt würde ich gerne auf Qt 4.1.3 umstellen und habe keinen Ersatz für bitBlt gefunden. Weiß jemand eine einfache Lösung diese Funktion zu ersetzen?

Danke für die Hilfe,
Isa

Verfasst: 16. Juni 2006 13:07
von Christian81
bitBlt wird in Qt4 als drawPixmap() realisiert
Hier der Qt3-Support - code aus qimage.cpp:

Code: Alles auswählen

void bitBlt(QImage *dst, int dx, int dy, const QImage *src, int sx, int sy, int sw, int sh,
            Qt::ImageConversionFlags flags)
{
    if (dst->isNull() || src->isNull())
        return;
    QPainter p(dst);
    p.drawImage(QPoint(dx, dy), *src, QRect(sx, sy, sw, sh), flags);
}

Verfasst: 16. Juni 2006 13:11
von Isa
Danke schön, hat funktioniert!!