code: @SuppressWarnings({"WeakerAccess", "unused"})
     public void  renderToCanvas(Canvas canvas, RenderOptions renderOptions)
     {
        if (renderOptions == null)
           renderOptions = new RenderOptions();
  
        if (!renderOptions.hasViewPort()) {
           renderOptions.viewPort(0f, 0f, (float) canvas.getWidth(), (float) canvas.getHeight());
        }
  
        SVGAndroidRenderer  renderer = new SVGAndroidRenderer(canvas, this.renderDPI);
  
        renderer.renderDocument(this, renderOptions);
     }
docs: Renders this SVG document to a Canvas object.
  
  @param canvas the canvas to which the document should be rendered.
  @param renderOptions options that describe how to render this SVG on the Canvas.
  @since 1.3