Skip to content

Commit

Permalink
[qt6] Use QTransform instead of QMatrix
Browse files Browse the repository at this point in the history
QMatrix is dead
  • Loading branch information
m-kuhn authored and nyalldawson committed Mar 27, 2021
1 parent a75f6ab commit cdde805
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/core/raster/qgsrasterlayer.cpp
Expand Up @@ -75,7 +75,6 @@ email : tim at linfiniti.com
#include <QImage>
#include <QLabel>
#include <QList>
#include <QMatrix>
#include <QMessageBox>
#include <QPainter>
#include <QPixmap>
Expand Down
4 changes: 2 additions & 2 deletions src/core/symbology/qgsellipsesymbollayer.cpp
Expand Up @@ -272,7 +272,7 @@ void QgsEllipseSymbolLayer::renderPoint( QPointF point, QgsSymbolRenderContext &
return;
}

QMatrix transform;
QTransform transform;
transform.translate( point.x() + offset.x(), point.y() + offset.y() );
if ( !qgsDoubleNear( angle, 0.0 ) )
{
Expand Down Expand Up @@ -773,7 +773,7 @@ QRectF QgsEllipseSymbolLayer::bounds( QPointF point, QgsSymbolRenderContext &con
double angle = 0;
calculateOffsetAndRotation( context, size.width(), size.height(), hasDataDefinedRotation, offset, angle );

QMatrix transform;
QTransform transform;

// move to the desired position
transform.translate( point.x() + offset.x(), point.y() + offset.y() );
Expand Down
6 changes: 3 additions & 3 deletions src/core/symbology/qgsmarkersymbollayer.cpp
Expand Up @@ -2747,7 +2747,7 @@ QRectF QgsSvgMarkerSymbolLayer::bounds( QPointF point, QgsSymbolRenderContext &c
}
}

QMatrix transform;
QTransform transform;
// move to the desired position
transform.translate( point.x() + outputOffset.x(), point.y() + outputOffset.y() );

Expand Down Expand Up @@ -3154,7 +3154,7 @@ QRectF QgsRasterMarkerSymbolLayer::bounds( QPointF point, QgsSymbolRenderContext
double angle = 0.0;
calculateOffsetAndRotation( context, scaledSize, scaledSize * ( height / width ), outputOffset, angle );

QMatrix transform;
QTransform transform;

// move to the desired position
transform.translate( point.x() + outputOffset.x(), point.y() + outputOffset.y() );
Expand Down Expand Up @@ -3606,7 +3606,7 @@ QRectF QgsFontMarkerSymbolLayer::bounds( QPointF point, QgsSymbolRenderContext &
calculateOffsetAndRotation( context, scaledSize, hasDataDefinedRotation, offset, angle );
scaledSize = context.renderContext().convertToPainterUnits( scaledSize, mSizeUnit, mSizeMapUnitScale );

QMatrix transform;
QTransform transform;

// move to the desired position
transform.translate( point.x() + offset.x(), point.y() + offset.y() );
Expand Down

0 comments on commit cdde805

Please sign in to comment.