|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--quicktime.util.QTByteObject | +--quicktime.qd.QDColor
Represents color as 16bit values for each component and alpha channel. Once created this class is a read only color. The static color variables are the same as the java.awt.Color colors, but in 16bit format. The default format for the class (ie. the bytes that are returned by getBytes) is RGBColor.
Field Summary | |
static QDColor |
black
|
static QDColor |
blue
|
static QDColor |
brown
|
static QDColor |
cyan
|
static QDColor |
darkGray
|
static QDColor |
gray
|
static QDColor |
green
|
static int |
kIsARGBColor
These constants are used in the fromArray call to indicate which of the 4 formats the byte array is encoded in. |
static int |
kIsGradientColor
These constants are used in the fromArray call to indicate which of the 4 formats the byte array is encoded in. |
static int |
kIsRGBColor
These constants are used in the fromArray call to indicate which of the 4 formats the byte array is encoded in. |
static int |
kIsTQ3ColorARGB
These constants are used in the fromArray call to indicate which of the 4 formats the byte array is encoded in. |
static int |
kIsTQ3ColorRGB
These constants are used in the fromArray call to indicate which of the 4 formats the byte array is encoded in. |
static int |
kMaximumValue
This is a convenience value - it represents the largest value that a colour component can have. |
static QDColor |
lightGray
|
static QDColor |
magenta
|
static QDColor |
orange
|
static QDColor |
pink
|
static QDColor |
red
|
static QDColor |
white
|
static QDColor |
yellow
|
Fields inherited from interface quicktime.jdirect.QuickTimeLib |
JDirect_MacOSX, libraryInstance, name |
Constructor Summary | |
QDColor()
Create an instance of an QDColor class - Black |
|
QDColor(java.awt.Color color)
Deprecated. as of QTJava 4.0 |
|
QDColor(float red,
float green,
float blue)
Create an instance of an QDColor class. |
|
QDColor(float red,
float green,
float blue,
float alpha)
Create an instance of an QDColor class. |
|
QDColor(float red,
float green,
float blue,
float alpha,
float endingPercentage)
Create an instance of an QDColor class. |
|
QDColor(int red,
int green,
int blue)
Create an instance of an QDColor class. |
|
QDColor(int red,
int green,
int blue,
int alpha)
Create an instance of an QDColor class. |
Method Summary | |
java.lang.Object |
clone()
Returns a copy of this object |
static int |
convert16to8(int value)
Takes a 16bit color value and converts it into an 8bit value. |
static int |
convert8to16(int value)
Takes an 8bit color value and converts it into a 16bit value. |
static QDColor |
fromARGBColor(int argb)
Creates a QDColor with the specified ARGB value, where the alpha component is in bits 24-32 of the argument, where the red component is in bits 16-23 of the argument, the green component is in bits 8-15 of the argument, and the blue component is in bits 0-7. |
static QDColor |
fromArray(byte[] colorBytes,
int flag)
Takes a byte array and converts it to a QDColor. |
int |
getAlpha()
Return value of alpha component |
float |
getAlphaF()
Return value of alpha component as float |
int |
getARGB()
Converts to a packed int according to the pixel depth supplied. |
byte[] |
getARGBColor()
Returns the color as an ARGBColor value |
int |
getBlue()
Return value of blue component |
float |
getBlueF()
Return value of blue component as float |
static EndianDescriptor |
getEndianDescriptorARGBColor()
Returns the EndianDescriptor for ARGBColor color. |
static EndianDescriptor |
getEndianDescriptorGradientColor()
Returns the EndianDescriptor for ARGBColor color. |
static EndianDescriptor |
getEndianDescriptorRGBColor()
Returns the EndianDescriptor for RGBColor color. |
static EndianDescriptor |
getEndianDescriptorTQ3Color()
Returns the EndianDescriptor for TQ3Color color. |
static EndianDescriptor |
getEndianDescriptorTQ3ColorARGB()
Returns the EndianDescriptor for TQ3ColorARGB color. |
float |
getEndingPercentage()
Return value of ending percentage component |
byte[] |
getGradientColor()
Returns the color as an GradientColor value |
int |
getGreen()
Return value of green component |
float |
getGreenF()
Return value of green component as float |
int |
getRed()
Return value of red component |
float |
getRedF()
Return value of red component as float |
int |
getRGB()
Converts to a packed int according to the pixel depth supplied. |
byte[] |
getRGBColor()
Returns the color as an RGBColor value |
byte[] |
getTQ3ColorARGB()
Returns the color as a TQ3ColorARGB value |
byte[] |
getTQ3ColorRGB()
Returns the color as a TQ3ColorRGB value |
java.lang.String |
toString()
Returns the String representation of this object |
Methods inherited from class quicktime.util.QTByteObject |
equals, fromArray, getBytes, getSize |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final QDColor black
public static final QDColor white
public static final QDColor red
public static final QDColor green
public static final QDColor blue
public static final QDColor yellow
public static final QDColor magenta
public static final QDColor cyan
public static final QDColor darkGray
public static final QDColor gray
public static final QDColor lightGray
public static final QDColor pink
public static final QDColor orange
public static final QDColor brown
public static final int kMaximumValue
public static final int kIsRGBColor
public static final int kIsARGBColor
public static final int kIsTQ3ColorRGB
public static final int kIsGradientColor
public static final int kIsTQ3ColorARGB
Constructor Detail |
public QDColor()
public QDColor(int red, int green, int blue)
red
- the 16bit red valuegreen
- the 16bit green valueblue
- the 16bit blue valuepublic QDColor(int red, int green, int blue, int alpha)
red
- the 16bit red valuegreen
- the 16bit green valueblue
- the 16bit blue valuealpha
- the 16bit alpha valuepublic QDColor(float red, float green, float blue)
red
- the 0 to 1F red valuegreen
- the 0 to 1F green valueblue
- the 0 to 1F blue valuepublic QDColor(float red, float green, float blue, float alpha)
red
- the 0 to 1F red valuegreen
- the 0 to 1F green valueblue
- the 0 to 1F blue valuealpha
- the 0 to 1F alpha valuepublic QDColor(float red, float green, float blue, float alpha, float endingPercentage)
red
- the 0 to 1F red valuegreen
- the 0 to 1F green valueblue
- the 0 to 1F blue valuealpha
- the 0 to 1F alpha valueendingPercentage
- Specifies the percentage of the gradient (expressed as value between
0 and 1 , where 0 is the beginning of the gradient) at which the specified color begins.public QDColor(java.awt.Color color)
color
- the java.awt.Color class to convertMethod Detail |
public static final EndianDescriptor getEndianDescriptorRGBColor()
public static final EndianDescriptor getEndianDescriptorARGBColor()
public static final EndianDescriptor getEndianDescriptorGradientColor()
public static final EndianDescriptor getEndianDescriptorTQ3Color()
public static final EndianDescriptor getEndianDescriptorTQ3ColorARGB()
public static int convert8to16(int value)
public static int convert16to8(int value)
public static QDColor fromArray(byte[] colorBytes, int flag)
colorBytes
- the byte array containing the color valuesflag
- flag that describes the format of the byte arrayjava.lang.IllegalArgumentException
- if mismatch between minimum length of byte array and format flagpublic static QDColor fromARGBColor(int argb)
public byte[] getRGBColor()
public byte[] getARGBColor()
public byte[] getGradientColor()
public byte[] getTQ3ColorRGB()
public byte[] getTQ3ColorARGB()
public int getRed()
public float getRedF()
public int getGreen()
public float getGreenF()
public int getBlue()
public float getBlueF()
public int getAlpha()
public float getAlphaF()
public float getEndingPercentage()
public java.lang.Object clone()
public int getARGB()
public int getRGB()
public java.lang.String toString()
toString
in class QTByteObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |