Fixed positioning bug in fineToPixel(), minor clean-up.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@207 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: IsoSceneView.java,v 1.33 2001/08/09 06:26:52 shaper Exp $
|
// $Id: IsoSceneView.java,v 1.34 2001/08/09 17:04:56 shaper Exp $
|
||||||
|
|
||||||
package com.threerings.miso.scene;
|
package com.threerings.miso.scene;
|
||||||
|
|
||||||
@@ -88,9 +88,6 @@ public class IsoSceneView implements EditableSceneView
|
|||||||
// draw an outline around the highlighted full coordinate
|
// draw an outline around the highlighted full coordinate
|
||||||
paintHighlightedFull(gfx, _hfull.x, _hfull.y);
|
paintHighlightedFull(gfx, _hfull.x, _hfull.y);
|
||||||
|
|
||||||
// draw lines illustrating tracking of the mouse position
|
|
||||||
//paintMouseLines(gfx);
|
|
||||||
|
|
||||||
// restore the original clipping region
|
// restore the original clipping region
|
||||||
gfx.setClip(oldclip);
|
gfx.setClip(oldclip);
|
||||||
}
|
}
|
||||||
@@ -235,33 +232,6 @@ public class IsoSceneView implements EditableSceneView
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Paint lines showing the most recently calculated x- and y-axis
|
|
||||||
* mouse position tracking lines, and the mouse position itself.
|
|
||||||
*
|
|
||||||
* @param gfx the graphics context.
|
|
||||||
*/
|
|
||||||
protected void paintMouseLines (Graphics2D gfx)
|
|
||||||
{
|
|
||||||
Point[] lx = _model.lineX;
|
|
||||||
|
|
||||||
// draw the baseline x-axis line
|
|
||||||
gfx.setColor(Color.red);
|
|
||||||
gfx.drawLine(lx[0].x, lx[0].y, lx[1].x, lx[1].y);
|
|
||||||
|
|
||||||
/*
|
|
||||||
// draw line from last mouse pos to baseline
|
|
||||||
gfx.setColor(Color.yellow);
|
|
||||||
gfx.drawLine(ly[0].x, ly[0].y, ly[1].x, ly[1].y);
|
|
||||||
|
|
||||||
// draw the most recent mouse cursor position
|
|
||||||
gfx.setColor(Color.green);
|
|
||||||
gfx.fillRect(ly[0].x, ly[0].y, 2, 2);
|
|
||||||
gfx.setColor(Color.red);
|
|
||||||
gfx.drawRect(ly[0].x - 1, ly[0].y - 1, 3, 3);
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Paint the tile coordinate numbers in tile (x, y) whose top-left
|
* Paint the tile coordinate numbers in tile (x, y) whose top-left
|
||||||
* corner is at screen pixel coordinates (sx, sy).
|
* corner is at screen pixel coordinates (sx, sy).
|
||||||
@@ -382,10 +352,6 @@ public class IsoSceneView implements EditableSceneView
|
|||||||
*/
|
*/
|
||||||
public void invalidateScreenRect (int x, int y, int width, int height)
|
public void invalidateScreenRect (int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
// TODO: fix boundary conditions, store contiguous dirty tile
|
|
||||||
// row segments rather than individual tiles, use specialized
|
|
||||||
// data structure rather than allocating int[] every time.
|
|
||||||
|
|
||||||
// note that corner tiles may be included unnecessarily, but
|
// note that corner tiles may be included unnecessarily, but
|
||||||
// checking to determine whether they're actually needed
|
// checking to determine whether they're actually needed
|
||||||
// complicates the code with likely-insufficient benefit
|
// complicates the code with likely-insufficient benefit
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: IsoUtil.java,v 1.3 2001/08/08 22:29:39 shaper Exp $
|
// $Id: IsoUtil.java,v 1.4 2001/08/09 17:04:56 shaper Exp $
|
||||||
|
|
||||||
package com.threerings.miso.scene;
|
package com.threerings.miso.scene;
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ public class IsoUtil
|
|||||||
public static void fineToPixel (
|
public static void fineToPixel (
|
||||||
IsoSceneModel model, int x, int y, Point ppos)
|
IsoSceneModel model, int x, int y, Point ppos)
|
||||||
{
|
{
|
||||||
ppos.x = model.tilehwid + ((x - y - 1) * model.finehwid);
|
ppos.x = model.tilehwid + ((x - y) * model.finehwid);
|
||||||
ppos.y = (x + y) * model.finehhei;
|
ppos.y = (x + y) * model.finehhei;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user