60 |
transparency, transferType); |
transparency, transferType); |
61 |
} |
} |
62 |
|
|
63 |
|
/** |
64 |
|
* Construct a new ComponentColorModel. |
65 |
|
* |
66 |
|
* This constructor makes all bits of each sample significant, so for a |
67 |
|
* transferType of DataBuffer.BYTE, the bits per sample is 8, etc. If |
68 |
|
* both hasAlpha and isAlphaPremultiplied are true, color samples are |
69 |
|
* assumed to be premultiplied by the alpha component. Transparency may be |
70 |
|
* one of OPAQUE, BITMASK, or TRANSLUCENT. |
71 |
|
* |
72 |
|
* @param colorSpace The colorspace for this color model. |
73 |
|
* @param hasAlpha True if there is an alpha component. |
74 |
|
* @param isAlphaPremultiplied True if colors are already multiplied by |
75 |
|
* alpha. |
76 |
|
* @param transparency The type of alpha values. |
77 |
|
* @param transferType Data type of pixel sample values. |
78 |
|
* @since 1.4 |
79 |
|
*/ |
80 |
|
public ComponentColorModel(ColorSpace colorSpace, |
81 |
|
boolean hasAlpha, |
82 |
|
boolean isAlphaPremultiplied, |
83 |
|
int transparency, int transferType) |
84 |
|
{ |
85 |
|
this(colorSpace, null, hasAlpha, isAlphaPremultiplied, |
86 |
|
transparency, transferType); |
87 |
|
} |
88 |
|
|
89 |
public int getRed(int pixel) |
public int getRed(int pixel) |
90 |
{ |
{ |
91 |
if (getNumComponents()>1) throw new IllegalArgumentException(); |
if (getNumComponents()>1) throw new IllegalArgumentException(); |