|
From: <de...@us...> - 2013-01-21 09:39:01
|
Revision: 8230
http://fudaa.svn.sourceforge.net/fudaa/?rev=8230&view=rev
Author: deniger
Date: 2013-01-21 09:38:55 +0000 (Mon, 21 Jan 2013)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrIsoLayerDefault.java
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrIsoLayerDefault.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrIsoLayerDefault.java 2013-01-21 09:38:40 UTC (rev 8229)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrIsoLayerDefault.java 2013-01-21 09:38:55 UTC (rev 8230)
@@ -961,20 +961,55 @@
}
}
} else if (isLineAllPaintedByNode(minX, maxX, minY, maxY, x, y, nbPt)) {
- for (int iPt = 0; iPt < nbPt; iPt++) {
- int idxDone = x[iPt] + y[iPt] * w;
- if (idxDone >= 0 && !memory.isSelected(idxDone)) {
- memory.add(idxDone);
- double value = modelToUse.getDatatFor(idxElt, iPt);
+ boolean painted = false;
+ if (deltaX == 0 || deltaY == 0) {
+ double valueToUse = modelToUse.getDatatFor(idxElt, 0);
+ boolean constant = true;
+ //pour les points sur 2 pixels on ne fait pas le tests pour savoir si meme valeur.
+ if (deltaX >= 1 || deltaY >= 1) {
+ for (int iPt = 1; iPt < nbPt; iPt++) {
+ double val = modelToUse.getDatatFor(idxElt, iPt);
+ if (constant) {
+ constant = CtuluLib.isEquals(val, valueToUse, 1e-10);
+ if (!constant) {
+ break;
+ }
+ }
+ }
+ }
+ if (constant) {
+ painted = true;
final Color color = paletteCouleur_ == null ? null : ((BPalettePlage) paletteCouleur_).getColorFor(
- value);
+ valueToUse);
final Color c = rapide ? color : EbliLib.getAlphaColor(color, alpha_);
if (c != null) {
_g.setColor(c);
- _g.drawLine(x[iPt], y[iPt], x[iPt], y[iPt]);
+ _g.drawLine(minX, minY, maxX, maxY);
}
+ for (int iPt = 0; iPt < nbPt; iPt++) {
+ int idxDone = x[iPt] + y[iPt] * w;
+ if (idxDone >= 0) {
+ memory.add(idxDone);
+ }
+ }
}
+ }
+ if (!painted) {
+ for (int iPt = 0; iPt < nbPt; iPt++) {
+ int idxDone = x[iPt] + y[iPt] * w;
+ if (idxDone >= 0 && !memory.isSelected(idxDone)) {
+ memory.add(idxDone);
+ double value = modelToUse.getDatatFor(idxElt, iPt);
+ final Color color = paletteCouleur_ == null ? null : ((BPalettePlage) paletteCouleur_).getColorFor(
+ value);
+ final Color c = rapide ? color : EbliLib.getAlphaColor(color, alpha_);
+ if (c != null) {
+ _g.setColor(c);
+ _g.drawLine(x[iPt], y[iPt], x[iPt], y[iPt]);
+ }
+ }
+ }
}
} else {
v_ = modelToUse.fillWithData(idxElt, v_);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|