Formatting changes:
- removed tabs - explicitly specify imports - I made each comment a complete and punctuated sentance. - other minor convention changes git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1155 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,22 +1,24 @@
|
||||
//
|
||||
// $Id: ColorUtil.java,v 1.1 2002/03/26 20:09:43 ray Exp $
|
||||
// $Id: ColorUtil.java,v 1.2 2002/03/26 23:35:01 ray Exp $
|
||||
|
||||
package com.threerings.media.util;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
/**
|
||||
* Utilities to manipulate colors
|
||||
* Utilities to manipulate colors.
|
||||
*/
|
||||
public class ColorUtil
|
||||
{
|
||||
/**
|
||||
* @return a color halfway between the two colors
|
||||
* Blends the two supplied colors.
|
||||
*
|
||||
* @return a color halfway between the two colors.
|
||||
*/
|
||||
public static final Color blend (Color c1, Color c2)
|
||||
{
|
||||
return new Color((c1.getRed() + c2.getRed()) >> 1,
|
||||
(c1.getGreen() + c2.getGreen()) >> 1,
|
||||
(c1.getBlue() + c2.getBlue()) >> 1);
|
||||
return new Color((c1.getRed() + c2.getRed()) >> 1,
|
||||
(c1.getGreen() + c2.getGreen()) >> 1,
|
||||
(c1.getBlue() + c2.getBlue()) >> 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ObjectTileLayer.java,v 1.2 2002/03/26 20:17:51 ray Exp $
|
||||
// $Id: ObjectTileLayer.java,v 1.3 2002/03/26 23:35:01 ray Exp $
|
||||
|
||||
package com.threerings.media.tile;
|
||||
|
||||
@@ -57,7 +57,7 @@ public final class ObjectTileLayer
|
||||
*/
|
||||
public ObjectTile getTile (int column, int row)
|
||||
{
|
||||
return (ObjectTile) _tiles.get(IsoUtil.coordsToKey(column, row));
|
||||
return (ObjectTile) _tiles.get(IsoUtil.coordsToKey(column, row));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -67,15 +67,15 @@ public final class ObjectTileLayer
|
||||
*/
|
||||
public void setTile (int column, int row, ObjectTile tile)
|
||||
{
|
||||
_tiles.put(IsoUtil.coordsToKey(column, row), tile);
|
||||
_tiles.put(IsoUtil.coordsToKey(column, row), tile);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the tile at the specified row and column
|
||||
* Removes the tile at the specified row and column.
|
||||
*/
|
||||
public void clearTile (int column, int row)
|
||||
{
|
||||
_tiles.remove(IsoUtil.coordsToKey(column, row));
|
||||
_tiles.remove(IsoUtil.coordsToKey(column, row));
|
||||
}
|
||||
|
||||
/** Our tiles. */
|
||||
|
||||
Reference in New Issue
Block a user