|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.pdfview.colorspace.PDFColorSpace
com.sun.pdfview.colorspace.IndexedColor
public class IndexedColor
A PDFColorSpace for an IndexedColor model
Field Summary | |
---|---|
protected byte[] |
finalcolors
r,g,and b components of the color table as a single array, for Java's IndexColorModel |
Fields inherited from class com.sun.pdfview.colorspace.PDFColorSpace |
---|
COLORSPACE_CMYK, COLORSPACE_GRAY, COLORSPACE_PATTERN, COLORSPACE_RGB |
Constructor Summary | |
---|---|
IndexedColor(java.awt.Color[] table)
create a new IndexColor PDFColorSpace based on a table of colors. |
|
IndexedColor(PDFColorSpace base,
int count,
PDFObject stream)
create a new IndexColor PDFColorSpace based on another PDFColorSpace, a count of colors, and a stream of values. |
Method Summary | |
---|---|
byte[] |
getColorComponents()
Get the table of color components |
int |
getCount()
Get the number of indices |
int |
getNumComponents()
get the number of components of this colorspace (1) |
PDFPaint |
getPaint(float[] components)
get the color represented by the index. |
Methods inherited from class com.sun.pdfview.colorspace.PDFColorSpace |
---|
getColorSpace, getColorSpace, getColorSpace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected byte[] finalcolors
Constructor Detail |
---|
public IndexedColor(PDFColorSpace base, int count, PDFObject stream) throws java.io.IOException
base
- the color space in which the data is interpretedcount
- the number of colors in the tablestream
- a stream of bytes. The number of bytes must be count*n,
where n is the number of components in the base colorspace.
java.io.IOException
public IndexedColor(java.awt.Color[] table) throws java.io.IOException
table
- an array of colors
java.io.IOException
Method Detail |
---|
public int getCount()
public byte[] getColorComponents()
public int getNumComponents()
getNumComponents
in class PDFColorSpace
public PDFPaint getPaint(float[] components)
getPaint
in class PDFColorSpace
components
- an array of exactly one integer number whose
value is between 0 and the size of the color table - 1.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |