Provide a mechanism for getting the root color adjusted by the
colorization offsets. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1109 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
//
|
//
|
||||||
// $Id: Colorization.java,v 1.1 2002/03/08 07:50:32 mdb Exp $
|
// $Id: Colorization.java,v 1.2 2002/03/08 21:16:07 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.cast;
|
package com.threerings.cast;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
import com.threerings.media.util.ImageUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to support colorization of character component images.
|
* Used to support colorization of character component images.
|
||||||
@@ -36,6 +37,16 @@ public class Colorization
|
|||||||
this.offsets = offsets;
|
this.offsets = offsets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the root color adjusted by the colorization.
|
||||||
|
*/
|
||||||
|
public Color getColorizedRoot ()
|
||||||
|
{
|
||||||
|
float[] hsv = Color.RGBtoHSB(rootColor.getRed(), rootColor.getGreen(),
|
||||||
|
rootColor.getBlue(), null);
|
||||||
|
return new Color(ImageUtil.recolorColor(hsv, offsets));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares this colorization to another based on name.
|
* Compares this colorization to another based on name.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user