Skip to content

Commit

Permalink
qt6: Replace removed QMatrix with QTransform.
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxdude42 committed Jun 5, 2020
1 parent bd8f7ed commit 7177986
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions mythtv/libs/libmythui/mythimage.cpp
Expand Up @@ -7,7 +7,6 @@

// QT headers
#include <QImageReader>
#include <QMatrix>
#include <QNetworkReply>
#include <QPainter>
#include <QRgb>
Expand Down Expand Up @@ -199,19 +198,19 @@ void MythImage::Reflect(ReflectAxis axis, int shear, int scale, int length,
BoundaryWanted::No, fillDirection);
mirrorImage.setAlphaChannel(alphaChannel);

QMatrix shearMatrix;
QTransform shearTransform;
if (axis == ReflectAxis::Vertical)
{
shearMatrix.scale(1,(float)scale/100);
shearMatrix.shear((float)shear/100,0);
shearTransform.scale(1,(float)scale/100);
shearTransform.shear((float)shear/100,0);
}
else if (axis == ReflectAxis::Horizontal)
{
shearMatrix.scale((float)scale/100,1);
shearMatrix.shear(0,(float)shear/100);
shearTransform.scale((float)scale/100,1);
shearTransform.shear(0,(float)shear/100);
}

mirrorImage = mirrorImage.transformed(shearMatrix, Qt::SmoothTransformation);
mirrorImage = mirrorImage.transformed(shearTransform, Qt::SmoothTransformation);

QSize newsize;
if (axis == ReflectAxis::Vertical)
Expand Down

0 comments on commit 7177986

Please sign in to comment.