GradientBevelFilter filter = new GradientBevelFilter();
if (node.entries != null)
{
byte count = (byte)node.entries.size();
filter.setNumColors(count);
RGBA gradientColors[] = new RGBA[count];
int gradientRatios[] = new int[count];
filter.setGradientColors(gradientColors);
filter.setGradientRatio(gradientRatios);
GradRecord[] records = createGradRecords(node.entries);
for (int i = 0; i < records.length; i++)
{
GradRecord record = records[i];
RGB color = record.getColor();
if (color instanceof RGBA)
gradientColors[i] = (RGBA)color;
else
gradientColors[i] = new RGBA(color.getRed(), color.getGreen(), color.getBlue(), 0xFF);
gradientRatios[i] = record.getRatio();
}
}
filter.setAngle((float)(node.angle*Math.PI/180.0));