code: private void doFilledPath(SvgElement obj, Path path)
     {
        // First check for pattern fill. It requires special handling.
        if (state.style.fill instanceof SVG.PaintReference)
        {
           SVG.SvgObject  ref = document.resolveIRI(((SVG.PaintReference) state.style.fill).href);
           if (ref instanceof SVG.Pattern) {
              SVG.Pattern  pattern = (SVG.Pattern)ref;
              fillWithPattern(obj, path, pattern);
              return;
           }
        }
  
        // Otherwise do a normal fill
        canvas.drawPath(path, state.fillPaint);
     }
docs: /*
  Fill a path with either the given paint, or if a pattern is set, with the pattern.