public class LinearColorInterpolator extends java.lang.Object implements ColorInterpolator
| Modifier and Type | Class and Description |
|---|---|
static class |
LinearColorInterpolator.InterpolationDirection |
| Constructor and Description |
|---|
LinearColorInterpolator() |
LinearColorInterpolator(java.awt.color.ColorSpace colorSpace) |
| Modifier and Type | Method and Description |
|---|---|
java.awt.Color |
interpolate(java.awt.Color a,
java.awt.Color b,
float mixing)
Interpolates to a color between a and b
|
void |
setColorSpace(java.awt.color.ColorSpace colorSpace) |
void |
setColorSpace(java.awt.color.ColorSpace colorSpace,
LinearColorInterpolator.InterpolationDirection[] dir)
Sets the ColorSpace to use for interpolation.
|
void |
setInterpolationDirection(int componentIndex,
LinearColorInterpolator.InterpolationDirection dir) |
public LinearColorInterpolator()
public LinearColorInterpolator(java.awt.color.ColorSpace colorSpace)
public java.awt.Color interpolate(java.awt.Color a,
java.awt.Color b,
float mixing)
interpolate in interface ColorInterpolatora - First colorb - Second colormixing - Mixing coefficient; the fraction of a in the result.java.lang.IllegalArgumentException - if mixing is not between 0 and 1ColorInterpolator.interpolate(java.awt.Color, java.awt.Color, float)public void setColorSpace(java.awt.color.ColorSpace colorSpace,
LinearColorInterpolator.InterpolationDirection[] dir)
colorSpace - The color space for interpolationinterpDirection - An array of size colorSpace.getNumComponents()
giving the interpolation direction for each component.public void setColorSpace(java.awt.color.ColorSpace colorSpace)
public void setInterpolationDirection(int componentIndex,
LinearColorInterpolator.InterpolationDirection dir)
Copyright © 2000-2020 BioJava. All Rights Reserved.