fix r14018 (reenable pal label reprojection)

git-svn-id: http://svn.osgeo.org/qgis/trunk@14068 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
jef 2010-08-11 22:20:33 +00:00
parent 47df2962ea
commit 5dfa6e6c13

View File

@ -44,6 +44,7 @@
#include <qgsvectordataprovider.h>
#include <qgsgeometry.h>
#include <qgsmaprenderer.h>
#include "qgslogger.h"
using namespace pal;
@ -416,13 +417,14 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
}
QgsGeometry* geom = f.geometry();
if ( ct ) // reproject the geometry if necessary
geom->transform( *ct );
GEOSGeometry* geos_geom = geom->asGeos();
if ( geos_geom == NULL )
return; // invalid geometry
if ( ct != NULL ) // reproject the geometry if necessary
geom->transform( *ct );
if ( !checkMinimumSizeMM( context, geom, minFeatureSize ) )
{
return;
@ -858,9 +860,7 @@ void QgsPalLabeling::drawLabelCandidateRect( pal::LabelPosition* lp, QPainter* p
drawLabelCandidateRect( lp->getNextPart(), painter, xform );
}
#include "qgslogger.h"
void QgsPalLabeling::drawLabel( pal::LabelPosition* label, QPainter* painter, const QFont& f, const QColor& c, const QgsMapToPixel* xform, double bufferSize, \
void QgsPalLabeling::drawLabel( pal::LabelPosition* label, QPainter* painter, const QFont& f, const QColor& c, const QgsMapToPixel* xform, double bufferSize,
const QColor& bufferColor, bool drawBuffer )
{
QgsPoint outPt = xform->transform( label->getX(), label->getY() );