Skip to content
Permalink
Browse files

[qt6] Use QTransform instead of QMatrix

QMatrix is dead
  • Loading branch information
m-kuhn authored and nyalldawson committed Mar 27, 2021
1 parent a75f6ab commit cdde80576900d3fc87125e76e2b059d1170d0aa3
@@ -75,7 +75,6 @@ email : tim at linfiniti.com
#include <QImage>
#include <QLabel>
#include <QList>
#include <QMatrix>
#include <QMessageBox>
#include <QPainter>
#include <QPixmap>
@@ -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 ) )
{
@@ -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() );
@@ -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() );

@@ -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() );
@@ -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() );

0 comments on commit cdde805

Please sign in to comment.