backgrounEnd = resourceCache.getColor(DEFAULT_BACKGROUND_END);
backgroundStart = resourceCache.getColor(DEFAULT_BACKGROUND_START);
}
else if (segments.size() == 1)
{
GradientSegmentDef segment0 = segments.get(0);
backgrounEnd = resourceCache.getColor(segment0.getColor().content());
backgroundStart = backgrounEnd;
}
else
{
GradientSegmentDef segment0 = segments.get(0);
GradientSegmentDef segment1 = segments.get(1);
backgrounEnd = resourceCache.getColor(segment0.getColor().content());
backgroundStart = resourceCache.getColor(segment1.getColor().content());
}
graphics.setForegroundColor(backgrounEnd);
graphics.setBackgroundColor(backgroundStart);
graphics.fillGradient(fillRectangle.x, fillRectangle.y, fillRectangle.width, fillRectangle.height, isVertical);