public class Colix
extends java.lang.Object
Implements 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
Modifier and Type | Field | Description |
---|---|---|
static int |
ALPHA_SHIFT |
|
static short |
BLACK |
|
static short |
BLUE |
|
static short |
CHANGEABLE_MASK |
|
static short |
CYAN |
|
static short |
GOLD |
|
static short |
GRAY |
|
static short |
GREEN |
|
static short |
HOTPINK |
|
static short |
INHERIT_ALL |
|
static short |
INHERIT_COLOR |
|
static int |
LAST_AVAILABLE_COLIX |
|
static short |
LIME |
|
static short |
MAGENTA |
|
static short |
MAROON |
|
static short |
NAVY |
|
static short |
OLIVE |
|
static short |
OPAQUE_MASK |
|
static short |
ORANGE |
|
static short |
PINK |
|
static int[] |
predefinedArgbs |
|
static short |
PURPLE |
|
static short |
RAW_RGB |
|
static short |
RED |
|
static short |
SILVER |
|
static short |
SPECIAL_COLIX_MAX |
|
static short |
TEAL |
|
static int |
TRANSLUCENT_50 |
|
static int |
TRANSLUCENT_MASK |
|
static int |
TRANSLUCENT_SCREENED |
|
static int |
TRANSLUCENT_SHIFT |
|
static int |
TRANSPARENT |
|
static short |
UNMASK_CHANGEABLE_TRANSLUCENT |
|
static short |
USE_PALETTE |
|
static short |
WHITE |
|
static short |
YELLOW |
Constructor | Description |
---|---|
Colix() |
Modifier and Type | Method | Description |
---|---|---|
static int |
allocateColix(int argb) |
|
static short |
applyColorTranslucencyLevel(short colix,
float translucentLevel) |
|
static short |
copyColixTranslucency(short colixFrom,
short colixTo) |
|
static void |
flushShades() |
|
static int |
getArgb(short colix) |
|
static int |
getArgbGreyscale(short colix) |
|
static short |
getChangeableColixIndex(short colix) |
|
static short |
getColix(int argb) |
|
static short[] |
getColixArray(java.lang.String colorNames) |
|
static short |
getColixInherited(short myColix,
short parentColix) |
|
static short |
getColixO(java.lang.Object obj) |
|
static short |
getColixS(java.lang.String colorName) |
|
static float |
getColixTranslucencyFractional(short colix) |
|
static int |
getColixTranslucencyLevel(short colix) |
|
static short |
getColixTranslucent(int argb) |
|
static short |
getColixTranslucent3(short colix,
boolean isTranslucent,
float translucentLevel) |
|
static java.lang.String |
getHexCode(short colix) |
|
static java.lang.String |
getHexCodes(short[] colixes) |
|
static int[] |
getShades(short colix) |
|
static int[] |
getShadesArgb(int argb,
boolean asGrey) |
|
static int[] |
getShadesGreyscale(short colix) |
|
static boolean |
isColixColorInherited(short colix) |
|
static boolean |
isColixLastAvailable(short colix) |
|
static boolean |
isColixTranslucent(short colix) |
public static final short INHERIT_ALL
public static final short INHERIT_COLOR
public static final short USE_PALETTE
public static final short RAW_RGB
public static final short SPECIAL_COLIX_MAX
public static final short UNMASK_CHANGEABLE_TRANSLUCENT
public static final short CHANGEABLE_MASK
public static final int LAST_AVAILABLE_COLIX
public static final int TRANSLUCENT_SHIFT
public static final int ALPHA_SHIFT
public static final int TRANSLUCENT_MASK
public static final int TRANSLUCENT_SCREENED
public static final int TRANSPARENT
public static final int TRANSLUCENT_50
public static final short OPAQUE_MASK
public static final short BLACK
public static final short ORANGE
public static final short PINK
public static final short BLUE
public static final short WHITE
public static final short CYAN
public static final short RED
public static final short GREEN
public static final short GRAY
public static final short SILVER
public static final short LIME
public static final short MAROON
public static final short NAVY
public static final short OLIVE
public static final short PURPLE
public static final short TEAL
public static final short MAGENTA
public static final short YELLOW
public static final short HOTPINK
public static final short GOLD
public static final int[] predefinedArgbs
public static short getColix(int argb)
public static int allocateColix(int argb)
public static final int getArgbGreyscale(short colix)
public static final int[] getShadesArgb(int argb, boolean asGrey)
public static final int[] getShades(short colix)
public static final int[] getShadesGreyscale(short colix)
public static final void flushShades()
public static short getColixO(java.lang.Object obj)
public static final short applyColorTranslucencyLevel(short colix, float translucentLevel)
public static boolean isColixLastAvailable(short colix)
public static int getArgb(short colix)
public static final boolean isColixColorInherited(short colix)
public static final short getColixInherited(short myColix, short parentColix)
public static final boolean isColixTranslucent(short colix)
public static final short getChangeableColixIndex(short colix)
public static final short getColixTranslucent3(short colix, boolean isTranslucent, float translucentLevel)
public static final short copyColixTranslucency(short colixFrom, short colixTo)
public static float getColixTranslucencyFractional(short colix)
public static final int getColixTranslucencyLevel(short colix)
public static short getColixS(java.lang.String colorName)
public static short[] getColixArray(java.lang.String colorNames)
public static java.lang.String getHexCode(short colix)
public static java.lang.String getHexCodes(short[] colixes)
public static short getColixTranslucent(int argb)