|
From: <bma...@us...> - 2011-04-06 14:11:47
|
Revision: 6208
http://fudaa.svn.sourceforge.net/fudaa/?rev=6208&view=rev
Author: bmarchan
Date: 2011-04-06 14:11:41 +0000 (Wed, 06 Apr 2011)
Log Message:
-----------
Fix : Correction mode accrochage sur sommets.
Modified Paths:
--------------
trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueAffichageDonneesAbstract.java
trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueAffichageDonneesInterface.java
trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueGeometry.java
trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZScene.java
Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueAffichageDonneesAbstract.java
===================================================================
--- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueAffichageDonneesAbstract.java 2011-04-06 08:36:36 UTC (rev 6207)
+++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueAffichageDonneesAbstract.java 2011-04-06 14:11:41 UTC (rev 6208)
@@ -306,7 +306,7 @@
return null;
}
- public EbliListeSelectionMultiInterface selectionMulti(GrPoint _ptReel, int _tolerancePixel, boolean _inDepth) {
+ public EbliListeSelectionMultiInterface selectVertices(GrPoint _ptReel, int _tolerancePixel, boolean _inDepth) {
return null;
}
Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueAffichageDonneesInterface.java
===================================================================
--- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueAffichageDonneesInterface.java 2011-04-06 08:36:36 UTC (rev 6207)
+++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueAffichageDonneesInterface.java 2011-04-06 14:11:41 UTC (rev 6208)
@@ -146,7 +146,7 @@
* points suceptibles d'etre selectionn\xE9s.
* @return Les indices des sous objets selectionn\xE9s, ou null si aucune selection.
*/
- EbliListeSelectionMultiInterface selectionMulti(GrPoint _ptReel, int _tolerancePixel, boolean _inDepth);
+ EbliListeSelectionMultiInterface selectVertices(GrPoint _ptReel, int _tolerancePixel, boolean _inDepth);
/**
* @return la ligne repr\xE9sentant la s\xE9lection courant. null si s\xE9lection non adequate
Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueGeometry.java
===================================================================
--- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueGeometry.java 2011-04-06 08:36:36 UTC (rev 6207)
+++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZCalqueGeometry.java 2011-04-06 14:11:41 UTC (rev 6208)
@@ -170,7 +170,7 @@
if (!isSelectable()) return false;
if (this.mode!=SelectionMode.NORMAL) {
- final EbliListeSelectionMulti l = selectionMulti(_pt, _tolerancePixel, false);
+ final EbliListeSelectionMulti l = selectionMulti(_pt, _tolerancePixel, false, this.mode);
changeSelectionMulti(l, _action);
if ((l == null) || (l.isEmpty())) {
return false;
@@ -957,7 +957,19 @@
return r;
}
- public EbliListeSelectionMulti selectionMulti(final GrPoint _ptReel, final int _tolerancePixel, boolean _inDepth) {
+ @Override
+ public EbliListeSelectionMulti selectVertices(final GrPoint _ptReel, final int _tolerancePixel, boolean _inDepth) {
+ return selectionMulti(_ptReel, _tolerancePixel, _inDepth, SelectionMode.ATOMIC);
+ }
+
+ /**
+ * @param _ptReel
+ * @param _tolerancePixel
+ * @param _inDepth False : Seul le premier point trouv\xE9 est retourn\xE9. Sinon, continue avec les points dessous.
+ * @param _mode Le mode de selection, sur sommets ou segments.
+ * @return La liste de selection.
+ */
+ public EbliListeSelectionMulti selectionMulti(final GrPoint _ptReel, final int _tolerancePixel, boolean _inDepth, SelectionMode _mode) {
final GrMorphisme versReel = getVersReel();
GrBoite bClip = getDomaine();
if (bClip == null || (!bClip.contientXY(_ptReel)) && (bClip.distanceXY(_ptReel) > _tolerancePixel)) {
@@ -974,7 +986,7 @@
modele_.getDomaineForGeometry(i, btLigne);
if (btLigne.contientXY(_ptReel) || btLigne.distanceXY(_ptReel) < distanceReel) {
- if (this.mode==SelectionMode.ATOMIC) {
+ if (_mode==SelectionMode.ATOMIC) {
for (int j=modele_.getNbPointForGeometry(i)-1; j>=0; j--) {
modele_.point(p, i, j);
if (bClip.contientXY(p)&&(p.distanceXY(_ptReel)<distanceReel)) {
@@ -1120,6 +1132,7 @@
return false;
}
+ @Override
public boolean setSelection(final int[] _idx) {
if (!isSelectable()) return false;
@@ -1132,6 +1145,7 @@
return false;
}
+ @Override
public boolean changeSelection(EbliListeSelectionMultiInterface _selection, int _action) {
if (!isSelectable()) return false;
@@ -1144,6 +1158,7 @@
}
}
+ @Override
public boolean selectNext() {
if (this.mode==SelectionMode.NORMAL) {
return super.selectNext();
@@ -1169,6 +1184,7 @@
}
}
+ @Override
public boolean selectPrevious() {
if (this.mode==SelectionMode.NORMAL) {
return super.selectPrevious();
Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZScene.java
===================================================================
--- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZScene.java 2011-04-06 08:36:36 UTC (rev 6207)
+++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/ZScene.java 2011-04-06 14:11:41 UTC (rev 6208)
@@ -565,7 +565,7 @@
public ZSceneSelection selection(final GrPoint _pt, final int _tolerance) {
selTmp_.clear();
for (ZCalqueAffichageDonneesInterface cq : getTargetLayers()) {
- EbliListeSelectionMulti sel=(EbliListeSelectionMulti)cq.selectionMulti(_pt, _tolerance, true);
+ EbliListeSelectionMulti sel=(EbliListeSelectionMulti)cq.selectVertices(_pt, _tolerance, true);
if (sel!=null)
selTmp_.addLayerListSelectionMulti(cq,sel);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|