@@ -682,7 +682,8 @@ QList<QPolygonF> offsetLine( QPolygonF polyline, double dist )
682
682
683
683
QgsPolyline tempPolyline ( pointCount );
684
684
QPointF* tempPtr = polyline.data ();
685
- for ( i = 0 ; i < pointCount; ++i, tempPtr++ ) tempPolyline[i] = QgsPoint ( tempPtr->rx (), tempPtr->ry () );
685
+ for ( i = 0 ; i < pointCount; ++i, tempPtr++ )
686
+ tempPolyline[i] = QgsPoint ( tempPtr->rx (), tempPtr->ry () );
686
687
687
688
QgsGeometry* tempGeometry = QgsGeometry::fromPolyline ( tempPolyline );
688
689
if ( tempGeometry )
@@ -702,31 +703,33 @@ QList<QPolygonF> offsetLine( QPolygonF polyline, double dist )
702
703
newLine.resize ( pointCount );
703
704
704
705
QgsPoint* tempPtr2 = tempPolyline.data ();
705
- for ( i = 0 ; i < pointCount; ++i, tempPtr2++ ) newLine[i] = QPointF ( tempPtr2->x (), tempPtr2->y () );
706
+ for ( i = 0 ; i < pointCount; ++i, tempPtr2++ )
707
+ newLine[i] = QPointF ( tempPtr2->x (), tempPtr2->y () );
706
708
resultLine.append ( newLine );
707
709
708
710
delete tempGeometry;
709
711
return resultLine;
710
712
}
711
713
else if ( QGis::flatType ( tempGeometry->wkbType () ) == QGis::WKBMultiLineString )
712
714
{
713
- QgsMultiPolyline tempMPolyline = tempGeometry->asMultiPolyline ();
715
+ QgsMultiPolyline tempMPolyline = tempGeometry->asMultiPolyline ();
714
716
715
- for ( int part = 0 ; part < tempMPolyline.count (); ++part )
716
- {
717
- tempPolyline = tempMPolyline[ part ];
717
+ for ( int part = 0 ; part < tempMPolyline.count (); ++part )
718
+ {
719
+ tempPolyline = tempMPolyline[ part ];
718
720
719
- pointCount = tempPolyline.count ();
720
- newLine.resize ( pointCount );
721
+ pointCount = tempPolyline.count ();
722
+ newLine.resize ( pointCount );
721
723
722
- QgsPoint* tempPtr2 = tempPolyline.data ();
723
- for ( i = 0 ; i < pointCount; ++i, tempPtr2++ ) newLine[i] = QPointF ( tempPtr2->x (), tempPtr2->y () );
724
- resultLine.append ( newLine );
724
+ QgsPoint* tempPtr2 = tempPolyline.data ();
725
+ for ( i = 0 ; i < pointCount; ++i, tempPtr2++ )
726
+ newLine[i] = QPointF ( tempPtr2->x (), tempPtr2->y () );
727
+ resultLine.append ( newLine );
725
728
726
- newLine = QPolygonF ();
727
- }
728
- delete tempGeometry;
729
- return resultLine;
729
+ newLine = QPolygonF ();
730
+ }
731
+ delete tempGeometry;
732
+ return resultLine;
730
733
}
731
734
}
732
735
delete tempGeometry;
0 commit comments