com.threerings.media.image
Class ColorPository.ColorRecord

java.lang.Object
  extended by com.threerings.media.image.ColorPository.ColorRecord
All Implemented Interfaces:
Serializable, Comparable<ColorPository.ColorRecord>
Enclosing class:
ColorPository

public static class ColorPository.ColorRecord
extends Object
implements Serializable, Comparable<ColorPository.ColorRecord>

Used to store information on a particular color. These are public to simplify the XML parsing process, so pay them no mind.

See Also:
Serialized Form

Field Summary
protected  Colorization _zation
          Our data represented as a colorization.
 ColorPository.ClassRecord cclass
          The colorization class to which we belong.
 int colorId
          A unique colorization identifier (used in fingerprints).
 String name
          The name of the target color.
 float[] offsets
          Data indicating the offset (in HSV color space) from the source color to recolor to this color.
 boolean starter
          Tags this color as a legal starting color or not.
 
Constructor Summary
ColorPository.ColorRecord()
           
 
Method Summary
 int compareTo(ColorPository.ColorRecord other)
           
 Colorization getColorization()
          Returns the data in this record configured as a colorization instance.
 int getColorPrint()
          Returns a value that is the composite of our class id and color id which can be used to identify a colorization record.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cclass

public ColorPository.ClassRecord cclass
The colorization class to which we belong.


colorId

public int colorId
A unique colorization identifier (used in fingerprints).


name

public String name
The name of the target color.


offsets

public float[] offsets
Data indicating the offset (in HSV color space) from the source color to recolor to this color.


starter

public boolean starter
Tags this color as a legal starting color or not. This is a shameful copout, placing application-specific functionality into a general purpose library class.


_zation

protected transient Colorization _zation
Our data represented as a colorization.

Constructor Detail

ColorPository.ColorRecord

public ColorPository.ColorRecord()
Method Detail

getColorPrint

public int getColorPrint()
Returns a value that is the composite of our class id and color id which can be used to identify a colorization record. This value will always be a positive integer that fits into 16 bits.


getColorization

public Colorization getColorization()
Returns the data in this record configured as a colorization instance.


compareTo

public int compareTo(ColorPository.ColorRecord other)
Specified by:
compareTo in interface Comparable<ColorPository.ColorRecord>

toString

public String toString()
Overrides:
toString in class Object