perfsonar-dev - perfsonar: r2736 - branches/perfsonarui/src/org/perfsonar/perfsonarui/mapprojection
Subject: perfsonar development work
List archive
perfsonar: r2736 - branches/perfsonarui/src/org/perfsonar/perfsonarui/mapprojection
Chronological Thread
- From:
- To:
- Subject: perfsonar: r2736 - branches/perfsonarui/src/org/perfsonar/perfsonarui/mapprojection
- Date: Mon, 27 Aug 2007 12:49:06 -0400
Author: mgordon
Date: 2007-08-27 12:49:06 -0400 (Mon, 27 Aug 2007)
New Revision: 2736
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/mapprojection/MapProjection.java
Log:
..
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/mapprojection/MapProjection.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/mapprojection/MapProjection.java
2007-08-27 16:07:51 UTC (rev 2735)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/mapprojection/MapProjection.java
2007-08-27 16:49:06 UTC (rev 2736)
@@ -189,10 +189,10 @@
*/
public Image getImage()
{
- int left = (int)Math.min(rectLeft * mapImage.getWidth(null));
- int top = (int)Math.min(rectTop * mapImage.getHeight(null));
- int width = (int)Math.max(rectRight *
mapImage.getWidth(null)) - left;
- int height = (int)Math.max(rectBottom *
mapImage.getHeight(null)) - top;
+ int left = (int)Math.floor(rectLeft *
mapImage.getWidth(null));
+ int top = (int)Math.floor(rectTop * mapImage.getHeight(null));
+ int width = (int)Math.ceil(rectRight *
mapImage.getWidth(null)) - left;
+ int height = (int)Math.ceil(rectBottom *
mapImage.getHeight(null)) - top;
width = Math.max(1, width);
height = Math.max(1, height);
BufferedImage result = new BufferedImage(width, height,
BufferedImage.TYPE_3BYTE_BGR);
- perfsonar: r2736 - branches/perfsonarui/src/org/perfsonar/perfsonarui/mapprojection, svnlog, 08/27/2007
Archive powered by MHonArc 2.6.16.