public class Paint extends NativeObject
Modifier and Type | Method and Description |
---|---|
static Paint |
create(Document targetDocument,
ColorSpace colorSpace,
double[] color,
Transparency transparency)
Create an new paint.
|
static Paint |
createDynamicObject(long handle) |
double[] |
getColor()
The color values of this paint.
|
ColorSpace |
getColorSpace()
The color space of this paint.
|
Transparency |
getTransparency()
The transparency parameters of this paint or
null if this paint is opaque. |
equals, hashCode
public static Paint createDynamicObject(long handle)
public static Paint create(Document targetDocument, ColorSpace colorSpace, double[] color, Transparency transparency) throws ConformanceException
targetDocument
- the output document with which the returned object is associatedcolorSpace
- the color space of the paintcolor
- the color componentstransparency
- the transparency parameters.
Use null
to create an opaque paint.ConformanceException
- if the transparency
argument is not null
and Transparency.getAlpha()
of transparency
is not 1.0
and the explicitly specified conformance does not support transparency (PDF/A-1, PDF 1.0 - 1.3).ConformanceException
- if the transparency
argument is not null
and Transparency.getBlendMode()
is not BlendMode.NORMAL
and the explicitly specified conformance does not support transparency (PDF/A-1, PDF 1.0 - 1.3).java.lang.IllegalArgumentException
- if the targetDocument
argument is null
java.lang.IllegalArgumentException
- if the targetDocument
argument has already been closedjava.lang.IllegalArgumentException
- if the targetDocument
argument is read-onlyjava.lang.IllegalArgumentException
- if the colorSpace
argument is null
java.lang.IllegalArgumentException
- if the colorSpace
object has already been closedjava.lang.IllegalArgumentException
- if the colorSpace
is associated with a different documentjava.lang.IllegalArgumentException
- if the color
argument is null
java.lang.IllegalArgumentException
- if the color
argument contains too few elementsjava.lang.IllegalArgumentException
- if an element of the color
argument is out of rangejava.lang.IllegalArgumentException
- if color
is null
public ColorSpace getColorSpace()
java.lang.IllegalStateException
- the object has already been closedjava.lang.IllegalStateException
- the object has been created with any creation method of the document.public double[] getColor()
java.lang.IllegalStateException
- the object has already been closedjava.lang.IllegalStateException
- the object has been created with any creation method of the document.public Transparency getTransparency()
null
if this paint is opaque.java.lang.IllegalStateException
- the object has already been closedjava.lang.IllegalStateException
- the object has been created with any creation method of the document.