Skip to content

Commit

Permalink
Remove canvasPolygon() helper function
Browse files Browse the repository at this point in the history
Because it doesn't do enough for an extra function to make sense here.
This also gets rid of an unused variable.
  • Loading branch information
joto authored and nyalldawson committed Oct 23, 2021
1 parent e4b611d commit b27190f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/app/decorations/qgsdecorationgrid.cpp
Expand Up @@ -375,12 +375,6 @@ void QgsDecorationGrid::drawCoordinateAnnotation( QgsRenderContext &context, QPo
QgsTextRenderer::drawText( QPointF( xpos, ypos ), rotation, QgsTextRenderer::AlignLeft, annotationStringList, context, mTextFormat );
}

QPolygonF canvasPolygon( const QgsMapSettings &mapSettings )
{
const QPolygonF poly;
return mapSettings.visiblePolygon();
}

bool clipByRect( QLineF &line, const QPolygonF &rect )
{
QVector<QLineF> borderLines;
Expand Down Expand Up @@ -441,7 +435,7 @@ int QgsDecorationGrid::xGridLines( const QgsMapSettings &mapSettings, QList< QPa
if ( mGridIntervalY / mapSettings.mapUnitsPerPixel() < 1 )
return 1;

const QPolygonF canvasPoly = canvasPolygon( mapSettings );
const QPolygonF canvasPoly = mapSettings.visiblePolygon();
const QPolygonF mapPolygon = canvasExtent( mapSettings );
const QRectF mapBoundingRect = mapPolygon.boundingRect();
const QLineF lineEast( mapPolygon[2], mapPolygon[1] );
Expand Down Expand Up @@ -486,7 +480,7 @@ int QgsDecorationGrid::yGridLines( const QgsMapSettings &mapSettings, QList< QPa
if ( mGridIntervalX / mapSettings.mapUnitsPerPixel() < 1 )
return 1;

const QPolygonF canvasPoly = canvasPolygon( mapSettings );
const QPolygonF canvasPoly = mapSettings.visiblePolygon();
const QPolygonF mapPolygon = canvasExtent( mapSettings );
const QLineF lineSouth( mapPolygon[3], mapPolygon[2] );
const QLineF lineNorth( mapPolygon[0], mapPolygon[1] );
Expand Down

0 comments on commit b27190f

Please sign in to comment.