Revision 24381
trunk/libraries/libRaster/src/org/gvsig/raster/dataset/MultiRasterDataset.java | ||
---|---|---|
386 | 386 |
|
387 | 387 |
//Ajustamos por si nos hemos salido del raster |
388 | 388 |
if(((int)(Math.min(p1X, p2X) + width)) > getWidth()) |
389 |
width = (int)getWidth();
|
|
389 |
width = (int)(getWidth() - Math.min(p1X, p2X));
|
|
390 | 390 |
if(((int)(Math.min(p1Y, p2Y) + height)) > getHeight()) |
391 |
height = (int)getHeight();
|
|
391 |
height = (int)(getHeight() - Math.min(p1Y, p2Y));
|
|
392 | 392 |
|
393 | 393 |
if (p1X < 0) |
394 | 394 |
p1X = 0; |
... | ... | |
486 | 486 |
|
487 | 487 |
//Ajustamos por si nos hemos salido del raster |
488 | 488 |
if(((int)(p1.getX() + width)) > getWidth()) |
489 |
width = (int)getWidth();
|
|
489 |
width = (int)(getWidth() - p1.getX());
|
|
490 | 490 |
if(((int)(p1.getY() + height)) > getHeight()) |
491 |
height = (int)getHeight();
|
|
492 |
|
|
491 |
height = (int)(getHeight() - p1.getY());
|
|
492 |
|
|
493 | 493 |
if (p1.getX() < 0) |
494 | 494 |
p1.setLocation(0, p1.getY()); |
495 | 495 |
if (p1.getY() < 0) |
Also available in: Unified diff