mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
QBitmap cleanup
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
0bad599825
commit
c09c55c5d6
2 changed files with 5 additions and 33 deletions
|
@ -192,15 +192,14 @@ QBitmap::QBitmap(const QString& fileName, const char *format)
|
|||
|
||||
QBitmap &QBitmap::operator=(const QPixmap &pixmap)
|
||||
{
|
||||
if (pixmap.isNull()) { // a null pixmap
|
||||
if (pixmap.isNull()) { // a null pixmap
|
||||
QBitmap bm(0, 0);
|
||||
QBitmap::operator=(bm);
|
||||
} else if (pixmap.depth() == 1) { // 1-bit pixmap
|
||||
QPixmap::operator=(pixmap); // shallow assignment
|
||||
} else { // n-bit depth pixmap
|
||||
QImage image;
|
||||
image = pixmap.toImage(); // convert pixmap to image
|
||||
*this = fromImage(image); // will dither image
|
||||
QPixmap::operator=(pixmap); // shallow assignment
|
||||
} else { // n-bit depth pixmap
|
||||
QImage image = pixmap.toImage(); // convert pixmap to image
|
||||
*this = fromImage(image); // will dither image
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
@ -299,30 +298,6 @@ QBitmap QBitmap::fromData(const QSize &size, const uchar *bits, QImage::Format m
|
|||
return QBitmap::fromImage(image);
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns a copy of this bitmap, transformed according to the given
|
||||
\a matrix.
|
||||
|
||||
\sa QPixmap::transformed()
|
||||
*/
|
||||
QBitmap QBitmap::transformed(const QTransform &matrix) const
|
||||
{
|
||||
return QPixmap::transformed(matrix);
|
||||
}
|
||||
|
||||
/*!
|
||||
\overload
|
||||
\obsolete
|
||||
|
||||
This convenience function converts the \a matrix to a QTransform
|
||||
and calls the overloaded function.
|
||||
*/
|
||||
QBitmap QBitmap::transformed(const QMatrix &matrix) const
|
||||
{
|
||||
return transformed(QTransform(matrix));
|
||||
}
|
||||
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
||||
|
|
|
@ -63,9 +63,6 @@ public:
|
|||
static QBitmap fromData(const QSize &size, const uchar *bits,
|
||||
QImage::Format monoFormat = QImage::Format_MonoLSB);
|
||||
|
||||
QBitmap transformed(const QMatrix &) const;
|
||||
QBitmap transformed(const QTransform &matrix) const;
|
||||
|
||||
typedef QExplicitlySharedDataPointer<QPixmapData> DataPtr;
|
||||
};
|
||||
Q_DECLARE_SHARED(QBitmap)
|
||||
|
|
Loading…
Add table
Reference in a new issue