@Nonnull
	public static Node ofFile(@Nonnull String path, int width, int height,
	                          @Nullable Map<RenderingHints.Key, Object> renderingHints) {
		SVGDocument document = DOCUMENT_CACHE.computeIfAbsent(path, p -> {
			try (InputStream is = ResourceUtil.resource(path)) {
				SVGLoader loader = new SVGLoader();
				return loader.load(is);
			} catch (Exception ex) {
				return EMPTY_DOCUMENT;
			}
		});

		// Render to image
		BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
		Graphics2D g = image.createGraphics();
		if (renderingHints != null) // Apply user-provided rendering hints
			renderingHints.forEach(g::setRenderingHint);
		document.render(null, g);
		g.dispose();

		// Convert to FX compatible image
		return new ImageView(Icons.convertToFxImage(image));
	}
@param path
		Path to local image. See constants defined in {@link SVG}.
@param width
		Desired image width.
@param height
		Desired image height.
@param renderingHints
		KV pairs for {@link RenderingHints} entries.

@return SVG node of file contents.
recaf-ui/src/main/java/software/coley/recaf/util/SVG.java