From: <bma...@us...> - 2017-05-22 10:49:41
|
Revision: 9610 http://sourceforge.net/p/fudaa/svn/9610 Author: bmarchan Date: 2017-05-22 10:49:39 +0000 (Mon, 22 May 2017) Log Message: ----------- Add GrPolyligne.inverse() Modified Paths: -------------- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/geometrie/GrPolyligne.java Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/geometrie/GrPolyligne.java =================================================================== --- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/geometrie/GrPolyligne.java 2017-05-21 20:22:16 UTC (rev 9609) +++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/geometrie/GrPolyligne.java 2017-05-22 10:49:39 UTC (rev 9610) @@ -497,6 +497,19 @@ } /** + * Inverse le sens de parcours de la polyligne. + */ + public final void inverse() { + int nb = sommets_.nombre(); + for (int i=0; i<nb/2; i++) { + GrPoint pt1=sommets_.renvoie(i); + GrPoint pt2=sommets_.renvoie(nb-1-i); + sommets_.remplace(pt2, i); + sommets_.remplace(pt1, nb-1-i); + } + } + + /** * Renvoie la liste de points de <code>_p </code> contenus dans le polygone <code>_polyRef</code>. * * @return null si aucun point n'appartient a <code>_polyRef</code>. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |