Package org.jmol.util
Class C
- java.lang.Object
-
- org.jmol.util.C
-
public final class C extends java.lang.ObjectNote: Color table is now in javajs/util/CU.javaImplements a color index model using a colix as a COLor IndeX.
A colix is a color index represented as a short int.
The value 0 is considered a null value ... for no color. In Jmol this generally means that the value is inherited from some other object.
The value 1 is used to indicate that color only is to be inherited. 0x0001 INHERIT_OPAQUE -- opaque, but with the color coming from the parent. 0x4001 INHERIT_TRANSLUCENT -- translucent but with the color coming from the parent. The value 2 is used to indicate that one of the palettes is to be used. 0x0002 PALETTE, opaque 0x4002 PALETTE, translucent Palettes themselves are coded separately in a Palette ID that is tracked with
- Author:
- Miguel, miguel@jmol.org
-
-
Field Summary
Fields Modifier and Type Field Description static intALPHA_SHIFT(package private) static int[]argbsprivate static int[]argbsGreyscalestatic shortBLACKstatic shortBLUEstatic shortCHANGEABLE_MASKprivate static Int2IntHashcolixHash(package private) static intcolixMaxstatic shortCYANstatic shortGOLDstatic shortGRAYstatic shortGREENstatic shortHOTPINKstatic shortINHERIT_ALLstatic shortINHERIT_COLORstatic intLAST_AVAILABLE_COLIXstatic shortLIMEstatic shortMAGENTAstatic shortMAROONstatic shortNAVYstatic shortOLIVEstatic shortOPAQUE_MASKstatic shortORANGEstatic shortPINKstatic shortPURPLEstatic shortRAW_RGBprivate static intRAW_RGB_INTstatic shortREDstatic shortSILVERstatic shortSPECIAL_COLIX_MAXstatic shortTEALstatic intTRANSLUCENT_MASKstatic intTRANSLUCENT_SCREENEDstatic intTRANSLUCENT_SHIFTstatic intTRANSPARENTstatic shortUNMASK_CHANGEABLE_TRANSLUCENTstatic shortUSE_PALETTEstatic shortWHITEstatic shortYELLOW
-
Constructor Summary
Constructors Constructor Description C()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intallocateColix(int argb, boolean forceLast)(package private) static voidcalcArgbsGreyscale()static shortcopyColixTranslucency(short colixFrom, short colixTo)static intgetArgb(short colix)static intgetArgbGreyscale(short colix)static shortgetBgContrast(int argb)static shortgetChangeableColixIndex(short colix)static shortgetColix(int argb)static short[]getColixArray(java.lang.String colorNames)static shortgetColixInherited(short myColix, short parentColix)static shortgetColixO(java.lang.Object obj)static shortgetColixS(java.lang.String colorName)static floatgetColixTranslucencyFractional(short colix)static java.lang.StringgetColixTranslucencyLabel(short colix)static intgetColixTranslucencyLevel(short colix)static shortgetColixTranslucent(int argb)static shortgetColixTranslucent3(short colix, boolean isTranslucent, float translucentLevel)static java.lang.StringgetHexCode(short colix)static java.lang.StringgetHexCodes(short[] colixes)private static intgetTranslucentFlag(float translucentLevel)static booleanisColixColorInherited(short colix)static booleanisColixLastAvailable(short colix)static booleanisColixTranslucent(short colix)static booleanrenderPass2(short colix)(package private) static voidsetLastGrey(int argb)
-
-
-
Field Detail
-
INHERIT_ALL
public static final short INHERIT_ALL
- See Also:
- Constant Field Values
-
INHERIT_COLOR
public static final short INHERIT_COLOR
- See Also:
- Constant Field Values
-
USE_PALETTE
public static final short USE_PALETTE
- See Also:
- Constant Field Values
-
RAW_RGB
public static final short RAW_RGB
- See Also:
- Constant Field Values
-
SPECIAL_COLIX_MAX
public static final short SPECIAL_COLIX_MAX
- See Also:
- Constant Field Values
-
colixMax
static int colixMax
-
argbs
static int[] argbs
-
argbsGreyscale
private static int[] argbsGreyscale
-
colixHash
private static final Int2IntHash colixHash
-
RAW_RGB_INT
private static final int RAW_RGB_INT
- See Also:
- Constant Field Values
-
UNMASK_CHANGEABLE_TRANSLUCENT
public static final short UNMASK_CHANGEABLE_TRANSLUCENT
- See Also:
- Constant Field Values
-
CHANGEABLE_MASK
public static final short CHANGEABLE_MASK
- See Also:
- Constant Field Values
-
LAST_AVAILABLE_COLIX
public static final int LAST_AVAILABLE_COLIX
- See Also:
- Constant Field Values
-
TRANSLUCENT_SHIFT
public static final int TRANSLUCENT_SHIFT
- See Also:
- Constant Field Values
-
ALPHA_SHIFT
public static final int ALPHA_SHIFT
- See Also:
- Constant Field Values
-
TRANSLUCENT_MASK
public static final int TRANSLUCENT_MASK
- See Also:
- Constant Field Values
-
TRANSLUCENT_SCREENED
public static final int TRANSLUCENT_SCREENED
- See Also:
- Constant Field Values
-
TRANSPARENT
public static final int TRANSPARENT
- See Also:
- Constant Field Values
-
OPAQUE_MASK
public static final short OPAQUE_MASK
- See Also:
- Constant Field Values
-
BLACK
public static final short BLACK
- See Also:
- Constant Field Values
-
ORANGE
public static final short ORANGE
- See Also:
- Constant Field Values
-
PINK
public static final short PINK
- See Also:
- Constant Field Values
-
BLUE
public static final short BLUE
- See Also:
- Constant Field Values
-
WHITE
public static final short WHITE
- See Also:
- Constant Field Values
-
CYAN
public static final short CYAN
- See Also:
- Constant Field Values
-
RED
public static final short RED
- See Also:
- Constant Field Values
-
GREEN
public static final short GREEN
- See Also:
- Constant Field Values
-
GRAY
public static final short GRAY
- See Also:
- Constant Field Values
-
SILVER
public static final short SILVER
- See Also:
- Constant Field Values
-
LIME
public static final short LIME
- See Also:
- Constant Field Values
-
MAROON
public static final short MAROON
- See Also:
- Constant Field Values
-
NAVY
public static final short NAVY
- See Also:
- Constant Field Values
-
OLIVE
public static final short OLIVE
- See Also:
- Constant Field Values
-
PURPLE
public static final short PURPLE
- See Also:
- Constant Field Values
-
TEAL
public static final short TEAL
- See Also:
- Constant Field Values
-
MAGENTA
public static final short MAGENTA
- See Also:
- Constant Field Values
-
YELLOW
public static final short YELLOW
- See Also:
- Constant Field Values
-
HOTPINK
public static final short HOTPINK
- See Also:
- Constant Field Values
-
GOLD
public static final short GOLD
- See Also:
- Constant Field Values
-
-
Method Detail
-
getColix
public static short getColix(int argb)
-
allocateColix
public static int allocateColix(int argb, boolean forceLast)
-
setLastGrey
static void setLastGrey(int argb)
-
calcArgbsGreyscale
static void calcArgbsGreyscale()
-
getArgbGreyscale
public static final int getArgbGreyscale(short colix)
-
getColixO
public static short getColixO(java.lang.Object obj)
-
getTranslucentFlag
private static int getTranslucentFlag(float translucentLevel)
-
isColixLastAvailable
public static boolean isColixLastAvailable(short colix)
-
getArgb
public static int getArgb(short colix)
-
isColixColorInherited
public static final boolean isColixColorInherited(short colix)
-
getColixInherited
public static final short getColixInherited(short myColix, short parentColix)
-
renderPass2
public static final boolean renderPass2(short colix)
-
isColixTranslucent
public static final boolean isColixTranslucent(short colix)
-
getChangeableColixIndex
public static final short getChangeableColixIndex(short colix)
-
getColixTranslucent3
public static final short getColixTranslucent3(short colix, boolean isTranslucent, float translucentLevel)
-
copyColixTranslucency
public static final short copyColixTranslucency(short colixFrom, short colixTo)
-
getColixTranslucencyFractional
public static float getColixTranslucencyFractional(short colix)
-
getColixTranslucencyLabel
public static java.lang.String getColixTranslucencyLabel(short colix)
-
getColixTranslucencyLevel
public static final int getColixTranslucencyLevel(short colix)
-
getColixS
public static short getColixS(java.lang.String colorName)
-
getColixArray
public static short[] getColixArray(java.lang.String colorNames)
-
getHexCode
public static java.lang.String getHexCode(short colix)
-
getHexCodes
public static java.lang.String getHexCodes(short[] colixes)
-
getColixTranslucent
public static short getColixTranslucent(int argb)
-
getBgContrast
public static short getBgContrast(int argb)
-
-