[Interest] How long is QMatrix obsolete?
abbapoh at gmail.com
Sat Aug 9 09:30:35 CEST 2014
See QImage QImage::transformed(const QTransform & matrix, Qt::TransformationMode mode = Qt::FastTransformation) const
QTransform differs from QMatrix(obsolete) in that it is a true 3x3 matrix, allowing perspective transformations. QTransform's toAffine() method allows casting QTransform to QMatrix(obsolete). If a perspective transformation has been specified on the matrix, then the conversion will cause loss of data.
QTransform is the recommended transformation class in Qt.
> 09 авг. 2014 г., в 11:11, Guido Seifert <wargand at gmx.de> написал(а):
> just out of curiosity. I updated some of my old code and noticed that QMatrix is marked obsolete.
> Now, this usually is nothing to write about here. However, I wonder how it is possible to 'obsolete'
> a class, on which other non obsolete Qt classes depend?
> For instance QImage in:
> QImage transformed(const QMatrix & matrix, Qt::TransformationMode mode = Qt::FastTransformation) const
> Or QBrush:
> void setMatrix(const QMatrix & matrix)
> I know, this does not mean that much... obsolete does not mean that the class will be removed. And it is
> a perfect example for:
> " It is provided to keep old source code working. We strongly advise against using it in new code."
> On the other hand...and strongly IMHO... Qt code should lead by example and not itself depend on obsolete code.
> Interest mailing list
> Interest at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest