Skip to content

Commit f2dab12

Browse files
author
wonder
committed
more fixes to bindings
git-svn-id: http://svn.osgeo.org/qgis/trunk@8037 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent f57987c commit f2dab12

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

python/gui/qgsrubberband.sip

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,31 @@ class QgsRubberBand: QgsMapCanvasItem
1212
void setWidth(int width);
1313

1414
void reset(bool isPolygon = false);
15-
void addPoint(const QgsPoint & p, int geometryIndex);
1615

17-
//!Removes the last point. Most usefull in connection with undo operations
18-
void removeLastPoint(int geometryIndex = 0);
16+
//! Add point to rubberband and update canvas
17+
//! If adding more points consider using update=false for better performance
18+
//! geometryIndex is the index of the feature part (in case of multipart geometries)
19+
void addPoint(const QgsPoint & p, bool update = true, int geometryIndex = 0);
1920

20-
void movePoint(const QgsPoint & p, int geometryIndex);
21-
void movePoint(int index, const QgsPoint& p, int geometryIndex);
21+
//!Removes the last point. Most usefull in connection with undo operations
22+
void removeLastPoint(int geometryIndex = 0);
2223

23-
/**Sets this rubber band to the geometry of an existing feature.
24+
void movePoint(const QgsPoint & p, int geometryIndex = 0);
25+
/**Moves the rubber band point specified by index. Note that if the rubber band is
26+
not used to track the last mouse position, the first point of the rubber band has two vertices*/
27+
void movePoint(int index, const QgsPoint& p, int geometryIndex = 0);
28+
29+
/**Sets this rubber band to the geometry of an existing feature.
2430
This is usefull for feature highlighting.
2531
@param geom the geometry object
2632
@param layer the layer containing the feature (used for coord transformation)
2733
@param render the maprender object (used for coord transformation)*/
2834
void setToGeometry(QgsGeometry* geom, QgsVectorLayer& layer);
2935

30-
/**Adds translation to original coordinates (all in map coordinates)*/
36+
/**Adds translation to original coordinates (all in map coordinates)*/
3137
void setTranslationOffset(double dx, double dy);
3238

33-
/**Returns count of vertices in all lists of mPoint*/
39+
/**Returns count of vertices in all lists of mPoint*/
3440
int numberOfVertices() const;
3541

3642
protected:

0 commit comments

Comments
 (0)