public class ColorIndexModulo extends Object implements ColorIndex
ColorIndex
from an existing ColorIndex
applying a modulo operation
to each index call.
This can be used to allow a ColorIndex
which supports a limited index range, be
applied to an infinite range of indices.
Constructor and Description |
---|
ColorIndexModulo(ColorIndex colorIndex) |
Modifier and Type | Method and Description |
---|---|
RGBColor |
get(int index)
The color for a particular index.
|
int |
numberUniqueColors()
The number of unique colors being described by the index.
|
public ColorIndexModulo(ColorIndex colorIndex)
public RGBColor get(int index)
ColorIndex
get
in interface ColorIndex
index
- the indexindex
.public int numberUniqueColors()
ColorIndex
numberUniqueColors
in interface ColorIndex
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.