Skip to content

Commit 3a1f6c4

Browse files
committedApr 6, 2016
Improve documentation for QgsGeometry::closestVertex
1 parent 5247673 commit 3a1f6c4

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed
 

‎python/core/geometry/qgsgeometry.sip

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,17 @@ class QgsGeometry
171171

172172
/**
173173
* Returns the vertex closest to the given point, the corresponding vertex index, squared distance snap point / target point
174-
* and the indices of the vertices before/after. The vertices before/after are -1 if not present
175-
*/
174+
* and the indices of the vertices before and after the closest vertex.
175+
* @param point point to search for
176+
* @param atVertex will be set to the vertex index of the closest found vertex
177+
* @param beforeVertex will be set to the vertex index of the previous vertex from the closest one. Will be set to -1 if
178+
* not present.
179+
* @param afterVertex will be set to the vertex index of the next vertex after the closest one. Will be set to -1 if
180+
* not present.
181+
* @param sqrDist will be set to the square distance between the closest vertex and the specified point
182+
* @returns closest point in geometry
183+
*/
184+
//TODO QGIS 3.0 - rename beforeVertex to previousVertex, afterVertex to nextVertex
176185
QgsPoint closestVertex( const QgsPoint& point, int& atVertex /Out/, int& beforeVertex /Out/, int& afterVertex /Out/, double& sqrDist /Out/ ) const;
177186

178187
/**

‎src/core/geometry/qgsgeometry.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,17 @@ class CORE_EXPORT QgsGeometry
213213

214214
/**
215215
* Returns the vertex closest to the given point, the corresponding vertex index, squared distance snap point / target point
216-
* and the indices of the vertices before/after. The vertices before/after are -1 if not present
217-
*/
216+
* and the indices of the vertices before and after the closest vertex.
217+
* @param point point to search for
218+
* @param atVertex will be set to the vertex index of the closest found vertex
219+
* @param beforeVertex will be set to the vertex index of the previous vertex from the closest one. Will be set to -1 if
220+
* not present.
221+
* @param afterVertex will be set to the vertex index of the next vertex after the closest one. Will be set to -1 if
222+
* not present.
223+
* @param sqrDist will be set to the square distance between the closest vertex and the specified point
224+
* @returns closest point in geometry
225+
*/
226+
//TODO QGIS 3.0 - rename beforeVertex to previousVertex, afterVertex to nextVertex
218227
QgsPoint closestVertex( const QgsPoint& point, int& atVertex, int& beforeVertex, int& afterVertex, double& sqrDist ) const;
219228

220229
/**

0 commit comments

Comments
 (0)
Please sign in to comment.