}
else if (token.startsWith("index=") && tokenizer.hasMoreElements() && (nextToken = tokenizer.nextToken()).startsWith("color=")) {
int index = Integer.parseInt(token.substring(6, token.length()));
int colorValue = Integer.parseInt(nextToken.substring(6, nextToken.length()));
pixel.setARGBValue(colorValue);
RGBColor color = new RGBColor(pixel.b, pixel.g, pixel.r);
colors.put(index, color);
}
}
boolean doInterpolate = pUgr.contains("numnodes=");
boolean doFade = pUgr.contains("smooth=yes");
final int maxIdx = 399;
if (doInterpolate) {
if (colors.get(0) == null) {
colors.put(0, new RGBColor(0, 0, 0));
}
if (colors.get(maxIdx) == null) {
colors.put(maxIdx, new RGBColor(0, 0, 0));
}
}
else {
RGBColor lastColor = new RGBColor(0, 0, 0);
for (int i = 0; i <= maxIdx; i++) {
RGBColor color = colors.get(i);
if (color == null) {
colors.put(i, lastColor);
}
else {
lastColor = color;