Skip to content
This repository was archived by the owner on Feb 18, 2026. It is now read-only.

SVGFile

0x3C50 edited this page Jan 18, 2023 · 1 revision

SVGs can be parsed and rendered by this library as well. To draw an SVG on screen, first initialize a new SVGFile (new SVGFile("svg source here", renderWidth, renderHeight)), then draw it on the hud (svgFile.render(matrixStack, x, y, width, height)).

Notes

  • The SVGFile class pre-renders the SVG into a texture, to cache it for future renders. This also means, that the resulting image might appear pixelated when resized beyond the initial dimensions given to the constructor.
  • Apache Batik is used to parse and render the SVGs

Clone this wiki locally