[QGIS Commit] r15095 - in trunk/qgis/src/core: . symbology-ng
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Jan 28 11:20:37 EST 2011
Author: mhugent
Date: 2011-01-28 08:20:37 -0800 (Fri, 28 Jan 2011)
New Revision: 15095
Modified:
trunk/qgis/src/core/qgsclipper.cpp
trunk/qgis/src/core/symbology-ng/qgsrendererv2.cpp
Log:
Fix line coordinate transform
Modified: trunk/qgis/src/core/qgsclipper.cpp
===================================================================
--- trunk/qgis/src/core/qgsclipper.cpp 2011-01-28 15:01:13 UTC (rev 15094)
+++ trunk/qgis/src/core/qgsclipper.cpp 2011-01-28 16:20:37 UTC (rev 15095)
@@ -85,7 +85,7 @@
if ( clipLineSegment( clipExtent.xMinimum(), clipExtent.xMaximum(), clipExtent.yMinimum(), clipExtent.yMaximum(),
p0x, p0y, p1x_c, p1y_c ) )
{
- bool newLine = line.size() > 0 && ( p1x_c != lastClipX || p1y_c != lastClipY );
+ bool newLine = line.size() > 0 && ( p0x != lastClipX || p0y != lastClipY );
if ( newLine )
{
//add edge points to connect old and new line
Modified: trunk/qgis/src/core/symbology-ng/qgsrendererv2.cpp
===================================================================
--- trunk/qgis/src/core/symbology-ng/qgsrendererv2.cpp 2011-01-28 15:01:13 UTC (rev 15094)
+++ trunk/qgis/src/core/symbology-ng/qgsrendererv2.cpp 2011-01-28 16:20:37 UTC (rev 15095)
@@ -53,11 +53,10 @@
wkb += sizeof( unsigned int );
bool hasZValue = ( wkbType == QGis::WKBLineString25D );
- double x, y;
+ double x, y, z;
const QgsCoordinateTransform* ct = context.coordinateTransform();
const QgsMapToPixel& mtp = context.mapToPixel();
- double z = 0; // dummy variable for coordiante transform
//apply clipping for large lines to achieve a better rendering performance
if ( nPoints > 100 )
@@ -89,7 +88,10 @@
for ( unsigned int i = 0; i < pts.size(); ++i )
{
if ( ct )
+ {
+ z = 0;
ct->transformInPlace( pts[i].rx(), pts[i].ry(), z );
+ }
mtp.transformInPlace( pts[i].rx(), pts[i].ry() );
}
More information about the QGIS-commit
mailing list