Class PDDeviceGray
- java.lang.Object
-
- com.tom_roush.pdfbox.pdmodel.graphics.color.PDColorSpace
-
- com.tom_roush.pdfbox.pdmodel.graphics.color.PDDeviceColorSpace
-
- com.tom_roush.pdfbox.pdmodel.graphics.color.PDDeviceGray
-
- All Implemented Interfaces:
COSObjectable
public final class PDDeviceGray extends PDDeviceColorSpace
A color space with black, white, and intermediate shades of gray.
-
-
Field Summary
Fields Modifier and Type Field Description static PDDeviceGrayINSTANCEThe single instance of this class.-
Fields inherited from class com.tom_roush.pdfbox.pdmodel.graphics.color.PDColorSpace
array
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float[]getDefaultDecode(int bitsPerComponent)Returns the default decode array for this color space.PDColorgetInitialColor()Returns the initial color value for this color space.StringgetName()Returns the name of the color space.intgetNumberOfComponents()Returns the number of components in this color spacefloat[]toRGB(float[] value)Returns the RGB equivalent of the given color value.android.graphics.BitmaptoRGBImage(android.graphics.Bitmap raster)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from class com.tom_roush.pdfbox.pdmodel.graphics.color.PDColorSpace
create, create
-
Methods inherited from class com.tom_roush.pdfbox.pdmodel.graphics.color.PDDeviceColorSpace
getCOSObject, toString
-
-
-
-
Field Detail
-
INSTANCE
public static final PDDeviceGray INSTANCE
The single instance of this class.
-
-
Method Detail
-
getName
public String getName()
Description copied from class:PDColorSpaceReturns the name of the color space.- Specified by:
getNamein classPDColorSpace- Returns:
- the name of the color space
-
getNumberOfComponents
public int getNumberOfComponents()
Description copied from class:PDColorSpaceReturns the number of components in this color space- Specified by:
getNumberOfComponentsin classPDColorSpace- Returns:
- the number of components in this color space
-
getDefaultDecode
public float[] getDefaultDecode(int bitsPerComponent)
Description copied from class:PDColorSpaceReturns the default decode array for this color space.- Specified by:
getDefaultDecodein classPDColorSpace- Returns:
- the default decode array
-
getInitialColor
public PDColor getInitialColor()
Description copied from class:PDColorSpaceReturns the initial color value for this color space.- Specified by:
getInitialColorin classPDColorSpace- Returns:
- the initial color value for this color space
-
toRGB
public float[] toRGB(float[] value)
Description copied from class:PDColorSpaceReturns the RGB equivalent of the given color value.- Specified by:
toRGBin classPDColorSpace- Parameters:
value- a color value with component values between 0 and 1- Returns:
- an array of R,G,B value between 0 and 255
-
toRGBImage
public android.graphics.Bitmap toRGBImage(android.graphics.Bitmap raster) throws IOException- Specified by:
toRGBImagein classPDColorSpace- Throws:
IOException
-
-