Class GuiSvgSource

java.lang.Object
com.render.api.gui.GuiSvgSource

public final class GuiSvgSource extends Object
Describes SVG content that can be loaded from a file, URL, raw string, or builder.
  • Method Details

    • resource

      public static GuiSvgSource resource(net.minecraft.resources.Identifier resourceId)
      Creates an SVG source backed by a resource inside the jar or active resource packs.
      Parameters:
      resourceId - SVG resource identifier
      Returns:
      SVG source
    • url

      public static GuiSvgSource url(String url)
      Creates an SVG source backed by a URL.
      Parameters:
      url - SVG URL
      Returns:
      SVG source
    • string

      public static GuiSvgSource string(String svg)
      Creates an SVG source from raw markup.
      Parameters:
      svg - SVG markup
      Returns:
      SVG source
    • builder

      public static GuiSvgSource builder(GuiSvgBuilder builder)
      Creates an SVG source from a builder.
      Parameters:
      builder - SVG builder
      Returns:
      SVG source
    • cacheKey

      public String cacheKey()
    • hintWidth

      public float hintWidth()
    • hintHeight

      public float hintHeight()
    • load

      public com.render.api.gui.GuiLoadedAsset load() throws Exception
      Throws:
      Exception
    • generation

      default long generation()