public class LinearColorInterpolator extends Object implements ColorInterpolator
| Modifier and Type | Class and Description |
|---|---|
static class |
LinearColorInterpolator.InterpolationDirection |
| Constructor and Description |
|---|
LinearColorInterpolator() |
LinearColorInterpolator(ColorSpace colorSpace) |
| Modifier and Type | Method and Description |
|---|---|
Color |
interpolate(Color a,
Color b,
float mixing)
Interpolates to a color between a and b
|
void |
setColorSpace(ColorSpace colorSpace) |
void |
setColorSpace(ColorSpace colorSpace,
LinearColorInterpolator.InterpolationDirection[] dir)
Sets the ColorSpace to use for interpolation.
|
void |
setInterpolationDirection(int componentIndex,
LinearColorInterpolator.InterpolationDirection dir) |
public LinearColorInterpolator()
public LinearColorInterpolator(ColorSpace colorSpace)
public Color interpolate(Color a, Color b, float mixing)
interpolate in interface ColorInterpolatora - First colorb - Second colormixing - Mixing coefficient; the fraction of a in the result.IllegalArgumentException - if mixing is not between 0 and 1ColorInterpolator.interpolate(java.awt.Color, java.awt.Color, float)public void setColorSpace(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(ColorSpace colorSpace)
public void setInterpolationDirection(int componentIndex,
LinearColorInterpolator.InterpolationDirection dir)
Copyright © 2000–2018 BioJava. All rights reserved.