com.threerings.miso.client
Class DirtyItemList.DirtyItem

java.lang.Object
  extended by com.threerings.miso.client.DirtyItemList.DirtyItem
Enclosing class:
DirtyItemList

public class DirtyItemList.DirtyItem
extends Object

A class to hold the items inserted in the dirty list along with all of the information necessary to render their dirty regions to the target graphics context when the time comes to do so.


Field Summary
 int lx
          The leftmost tile coordinates.
 int ly
          The leftmost tile coordinates.
 Object obj
          The dirtied object; one of either a sprite or an object tile.
 int ox
          The origin tile coordinates.
 int oy
          The origin tile coordinates.
 int rx
          The rightmost tile coordinates.
 int ry
          The rightmost tile coordinates.
 
Constructor Summary
DirtyItemList.DirtyItem()
           
 
Method Summary
 void clear()
          Releases all references held by this dirty item so that it doesn't inadvertently hold on to any objects while waiting to be reused.
 boolean equals(Object other)
           
 int getRearDepth()
          Returns the "depth" of our rear-most tile.
 int getRenderPriority()
          Returns the render priority for this dirty item.
 int hashCode()
           
 void init(Object obj, int x, int y)
          Initializes a dirty item.
 void paint(Graphics2D gfx)
          Paints the dirty item to the given graphics context.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

obj

public Object obj
The dirtied object; one of either a sprite or an object tile.


ox

public int ox
The origin tile coordinates.


oy

public int oy
The origin tile coordinates.


lx

public int lx
The leftmost tile coordinates.


ly

public int ly
The leftmost tile coordinates.


rx

public int rx
The rightmost tile coordinates.


ry

public int ry
The rightmost tile coordinates.

Constructor Detail

DirtyItemList.DirtyItem

public DirtyItemList.DirtyItem()
Method Detail

init

public void init(Object obj,
                 int x,
                 int y)
Initializes a dirty item.


paint

public void paint(Graphics2D gfx)
Paints the dirty item to the given graphics context. Only the portion of the item that falls within the given dirty rectangle is actually drawn.


getRearDepth

public int getRearDepth()
Returns the "depth" of our rear-most tile.


getRenderPriority

public int getRenderPriority()
Returns the render priority for this dirty item. It will be zero unless this is a display object which may have a custom render priority.


clear

public void clear()
Releases all references held by this dirty item so that it doesn't inadvertently hold on to any objects while waiting to be reused.


equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object