code: private void  decodePaintReference(boolean isFill, Box boundingBox, PaintReference paintref)
     {
        SVG.SvgObject  ref = document.resolveIRI(paintref.href);
        if (ref == null)
        {
           error("%s reference '%s' not found", (isFill ? "Fill":"Stroke"), paintref.href);
           if (paintref.fallback != null) {
              setPaintColour(state, isFill, paintref.fallback);
           } else {
              if (isFill)
                 state.hasFill = false;
              else
                 state.hasStroke = false;
           }
           return;
        }
        if (ref instanceof SvgLinearGradient)
           makeLinearGradient(isFill, boundingBox, (SvgLinearGradient) ref);
        else if (ref instanceof SvgRadialGradient)
           makeRadialGradient(isFill, boundingBox, (SvgRadialGradient) ref);
        else if (ref instanceof SolidColor)
           setSolidColor(isFill, (SolidColor) ref);
        //if (ref instanceof SVG.Pattern) {}  // May be needed later if/when we do direct rendering
     }
docs: /*
  Takes a PaintReference object and generates an appropriate Android Shader object from it.