Class GuiSvgSource
java.lang.Object
com.render.api.gui.GuiSvgSource
Describes SVG content that can be loaded from a file, URL, raw string, or builder.
-
Method Summary
Modifier and TypeMethodDescriptionstatic GuiSvgSourcebuilder(GuiSvgBuilder builder) Creates an SVG source from a builder.cacheKey()default longfloatfloatcom.render.api.gui.GuiLoadedAssetload()com.render.api.gui.GuiAssetSourcerasterVariant(float physicalWidth, float physicalHeight) static GuiSvgSourceresource(net.minecraft.resources.Identifier resourceId) Creates an SVG source backed by a resource inside the jar or active resource packs.default com.render.api.gui.GuiAssetSource.LoadSnapshotCaptures the exact immutable version consumed by one background load.static GuiSvgSourceCreates an SVG source from raw markup.static GuiSvgSourceCreates an SVG source backed by a URL.
-
Method Details
-
resource
Creates an SVG source backed by a resource inside the jar or active resource packs.- Parameters:
resourceId- SVG resource identifier- Returns:
- SVG source
-
url
Creates an SVG source backed by a URL.- Parameters:
url- SVG URL- Returns:
- SVG source
-
string
Creates an SVG source from raw markup.- Parameters:
svg- SVG markup- Returns:
- SVG source
-
builder
Creates an SVG source from a builder.- Parameters:
builder- SVG builder- Returns:
- SVG source
-
cacheKey
-
hintWidth
public float hintWidth() -
hintHeight
public float hintHeight() -
load
-
rasterVariant
public com.render.api.gui.GuiAssetSource rasterVariant(float physicalWidth, float physicalHeight) -
generation
default long generation() -
snapshotForLoad
default com.render.api.gui.GuiAssetSource.LoadSnapshot snapshotForLoad()Captures the exact immutable version consumed by one background load.
-