public class ColorPt
extends java.lang.Object
Constructor and Description |
---|
ColorPt()
Instantiates a new color point
|
ColorPt(double x,
double y,
double z)
Instantiates a new color point
|
ColorPt(double x,
double y,
double z,
double w)
Instantiates a new color point
|
Modifier and Type | Method and Description |
---|---|
static ColorPt |
__Create(long impl) |
long |
__GetHandle() |
void |
destroy()
Frees the native memory of the object.
|
boolean |
equals(java.lang.Object other) |
double |
get(int colorant_index)
Get the tint value at a given colorant index
|
int |
hashCode() |
void |
set()
Set the first 4 tint values to zero
|
void |
set(double x,
double y,
double z,
double w)
Set the first tint values to specified values
|
void |
set(int colorant_index,
double colorant_value)
Set a tint value at a given colorant index.
|
void |
setColorantNum(int num)
Set the colorant number.
|
public ColorPt() throws PDFNetException
PDFNetException
public ColorPt(double x, double y, double z) throws PDFNetException
x
- y
- z
- PDFNetException
public ColorPt(double x, double y, double z, double w) throws PDFNetException
x
- y
- z
- w
- PDFNetException
public void destroy() throws PDFNetException
PDFNetException
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void set() throws PDFNetException
PDFNetException
public void set(double x, double y, double z, double w) throws PDFNetException
x
- y
- z
- w
- PDFNetException
public void set(int colorant_index, double colorant_value) throws PDFNetException
Note:
For example, the following snippet will initialize the color point to [red, green, blue]: color.SetColorantNum(3); color.Set(0, red); color.Set(1, green); color.Set(2, blue); The above code snippet is equivalent to the following line: color.Set(red, green, blue)
If a color point has more than 4 colorants, SetColorantNum(num_colorants) must be called before getting or setting tint values.
colorant_index
- the color index. For example, for a color point associated with a
Gray color space the only allowed value for index is 0. For a color point
associated with a CMYK color space, the color_index can range
from 0 (cyan) to 4 (black).colorant_value
- The new tint value.PDFNetException
public double get(int colorant_index) throws PDFNetException
Note: The number of colorants depends on the associated color space. To find how many colorant are associated with a given color space use color_space.GetComponentNum().
colorant_index
- a colorant_indexPDFNetException
public void setColorantNum(int num) throws PDFNetException
Note: If a color point has more than 4 colorants, SetColorantNum(num_colorants) must be called before getting or setting tint values. The number of colorants depends on the associated color space. To find how many colorant are associated with a given color space use color_space.GetComponentNum().
num
- the new colorant numberPDFNetException
public static ColorPt __Create(long impl)
public long __GetHandle()