Commit 80fdb876 authored by Dumoulin Nicolas's avatar Dumoulin Nicolas
Browse files

gradient color dependent to HSI

1 merge request!1Add Svn history
Showing with 3 additions and 2 deletions
+3 -2
......@@ -64,6 +64,7 @@ public class Movement2DWithinShapeObserver extends ObserverListener implements C
private Color shapeColor;
@Description (name="HSI color",tooltip="HSI color")
private Color hsiColor;
private double hsiMaxValueThreshold=0.5;
@Description (name="Text color",tooltip="Text color")
private Color textColor;
......@@ -94,7 +95,6 @@ public class Movement2DWithinShapeObserver extends ObserverListener implements C
public Movement2DWithinShapeObserver(int margin,Color bgColor,Color shapeColor) {
this.margin = margin;
this.bgColor = bgColor;
this.shapeColor = shapeColor;
}
public String getTitle() {
......@@ -257,7 +257,8 @@ public class Movement2DWithinShapeObserver extends ObserverListener implements C
xHSI2 = (int) (xHSI * (widthMax / grid.getGridWidth()));
yHSI2 = (int) (yHSI * (heightMax / grid.getGridHeight()));
g2d.fillRect((int) xHSI2, (int) yHSI2, 3, 3);
g.setColor(new Color(0.43f, (float) (Math.min(1,grid.getCell(cptCell).getHabitatQuality()/hsiMaxValueThreshold)), 0.13f));
g2d.fillRect((int) xHSI2, (int) yHSI2, 3, 3);
xx[cptCell] = xHSI2;
yy[cptCell] = yHSI2;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment