From bcae50aa08b9d323417fccc715350b95a133f1bb Mon Sep 17 00:00:00 2001 From: Walter Korman Date: Thu, 18 Oct 2001 20:25:46 +0000 Subject: [PATCH] Render the placing tile to facilitate proper tile placement. Fixed up tile highlighting accordingly on tile deletion and location actions. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@495 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/miso/client/IsoSceneView.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/java/com/threerings/miso/client/IsoSceneView.java b/src/java/com/threerings/miso/client/IsoSceneView.java index acc56a0bd..e7f8d6e87 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.62 2001/10/17 23:39:06 shaper Exp $ +// $Id: IsoSceneView.java,v 1.63 2001/10/18 20:25:46 shaper Exp $ package com.threerings.miso.scene; @@ -122,8 +122,9 @@ public class IsoSceneView implements SceneView * A function where derived classes can paint extra stuff while we've * got the clipping region set up. */ - protected void paintExtras (Graphics2D g) + protected void paintExtras (Graphics2D gfx) { + // nothing for now } /** @@ -266,12 +267,20 @@ public class IsoSceneView implements SceneView { // create the bounding polygon for this object int key = getCoordinateKey(x, y); - Polygon bounds = IsoUtil.getObjectBounds(_model, _polys[x][y], tile); // save it off in the object bounds hashtable - _objpolys.put(key, bounds); + _objpolys.put(key, newObjectBounds(tile, x, y)); } + /** + * Creates and returns a new polygon bounding the given object + * tile positioned at the given scene coordinates. + */ + protected Polygon newObjectBounds (ObjectTile tile, int x, int y) + { + return IsoUtil.getObjectBounds(_model, _polys[x][y], tile); + } + /** * Returns a unique integer key corresponding to the given * coordinates, suitable for storing and retrieving objects from a