From 506623be27ed1fb727cd93c546f309d1b4cf7b44 Mon Sep 17 00:00:00 2001 From: Walter Korman Date: Thu, 9 Aug 2001 17:04:56 +0000 Subject: [PATCH] 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 --- .../threerings/miso/client/IsoSceneView.java | 36 +------------------ .../com/threerings/miso/client/IsoUtil.java | 4 +-- 2 files changed, 3 insertions(+), 37 deletions(-) diff --git a/src/java/com/threerings/miso/client/IsoSceneView.java b/src/java/com/threerings/miso/client/IsoSceneView.java index 8946bfe86..793d6b165 100644 --- a/src/java/com/threerings/miso/client/IsoSceneView.java +++ b/src/java/com/threerings/miso/client/IsoSceneView.java @@ -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; @@ -88,9 +88,6 @@ public class IsoSceneView implements EditableSceneView // draw an outline around the highlighted full coordinate paintHighlightedFull(gfx, _hfull.x, _hfull.y); - // draw lines illustrating tracking of the mouse position - //paintMouseLines(gfx); - // restore the original clipping region 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 * 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) { - // 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 // checking to determine whether they're actually needed // complicates the code with likely-insufficient benefit diff --git a/src/java/com/threerings/miso/client/IsoUtil.java b/src/java/com/threerings/miso/client/IsoUtil.java index b2d8b1d9d..123f008ce 100644 --- a/src/java/com/threerings/miso/client/IsoUtil.java +++ b/src/java/com/threerings/miso/client/IsoUtil.java @@ -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; @@ -157,7 +157,7 @@ public class IsoUtil public static void fineToPixel ( 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; }