{
JavaScriptObject grad = attr.getObject(Attribute.FILL.getProperty());
if (null != grad)
{
GradientJSO base = grad.cast();
if (LinearGradient.TYPE.equals(base.getType()))
{
context.setFillGradient(new LinearGradient((LinearGradientJSO) base));
context.fillText(getText(), 0, 0);
setWasFilledFlag(true);
}
else if (RadialGradient.TYPE.equals(base.getType()))
{
context.setFillGradient(new RadialGradient((RadialGradientJSO) base));
context.fillText(getText(), 0, 0);
setWasFilledFlag(true);
}
else if (PatternGradient.TYPE.equals(base.getType()))
{
context.setFillGradient(new PatternGradient((PatternGradientJSO) base));
context.fillText(getText(), 0, 0);