Revision 20061
trunk/extensions/extRasterTools-SE/src/org/gvsig/raster/beans/canvas/layers/functions/StraightLine.java | ||
---|---|---|
183 | 183 |
transparentCursor = Toolkit.getDefaultToolkit().createCustomCursor(image, new Point(0, 0), "invisibleCursor"); |
184 | 184 |
|
185 | 185 |
setColor(c); |
186 |
listSquare.add(new Square(0.0D, 0.0D)); |
|
187 |
listSquare.add(new Square(1.0D, 1.0D)); |
|
186 |
clearSquares(); |
|
187 |
addSquare(0.0D, 0.0D); |
|
188 |
addSquare(1.0D, 1.0D); |
|
188 | 189 |
} |
190 |
|
|
191 |
/** |
|
192 |
* Borra la lista de puntos |
|
193 |
*/ |
|
194 |
public void clearSquares() { |
|
195 |
listSquare.clear(); |
|
196 |
} |
|
197 |
|
|
198 |
/** |
|
199 |
* A?ade un punto a la lista de puntos |
|
200 |
* @param x |
|
201 |
* @param y |
|
202 |
*/ |
|
203 |
public void addSquare(double x, double y) { |
|
204 |
listSquare.add(new Square(x, y)); |
|
205 |
} |
|
189 | 206 |
|
190 | 207 |
/** |
191 | 208 |
* Dibujado de las l?neas y cuadros sobre el canvas |
trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/enhanced/ui/EnhancedListener.java | ||
---|---|---|
307 | 307 |
graphicsPanel.setLevelsEnabled(false); |
308 | 308 |
} |
309 | 309 |
baseFunction = new StraightLine(status.getBaseFunction().getColor()); |
310 |
((StraightLine) baseFunction).clearSquares(); |
|
311 |
for (int i = 0; i < stretch.stretchIn.length; i++) { |
|
312 |
((StraightLine) baseFunction).addSquare( |
|
313 |
(stretch.stretchIn[i] - stretch.minValue) / (stretch.maxValue - stretch.minValue), |
|
314 |
stretch.stretchOut[i] / 255.0D); |
|
315 |
} |
|
310 | 316 |
break; |
311 | 317 |
case 1: |
312 | 318 |
if (firstBand) { |
... | ... | |
336 | 342 |
if (baseFunction != null) { |
337 | 343 |
status.setBaseFunction(baseFunction); |
338 | 344 |
graphicsPanel.getInputHistogram().setHistogramDrawed(band); |
339 |
// graphicsPanel.getInputHistogram().getCanvas().replaceDrawableElement(baseFunction, BaseFunction.class); |
|
340 | 345 |
} |
341 | 346 |
} |
342 | 347 |
|
... | ... | |
355 | 360 |
firstLoadBand(stretch.green, HistogramGraphicBase.GREEN); |
356 | 361 |
firstLoadBand(stretch.red, HistogramGraphicBase.RED); |
357 | 362 |
firstLoadBand(stretch.gray, HistogramGraphicBase.GRAY); |
363 |
graphicsPanel.getRGB().setSelected(stretch.rgb); |
|
358 | 364 |
} |
359 | 365 |
graphicsPanel.getInputHistogram().repaint(); |
360 | 366 |
} |
Also available in: Unified diff