Class GuiSvgDocument
java.lang.Object
com.render.api.gui.GuiSvgDocument
Retained mutable SVG element tree with stable node identities and versioned
asynchronous rasterization.
DOM and style mutations increment generation(). The shared asset manager
keeps the last valid texture visible while a newer generation rasterizes, discards
obsolete completions, and publishes only the newest requested generation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal classStable retained SVG element wrapper. -
Method Summary
Modifier and TypeMethodDescriptionappend(GuiSvgDocument.Node parent, String tag) static GuiSvgDocumentbuilder(GuiSvgBuilder builder) cacheKey()longfloatfloathitTest(float x, float y) Performs transformed retained hit testing for SVG viewport, shape, path, line, polyline, polygon, image, and text geometry.com.render.api.gui.GuiLoadedAssetload()markup()nodes()static GuiSvgDocumentvoidremove(GuiSvgDocument.Node node) root()rule(GuiSvgSelector selector, Consumer<GuiStyleBuilder> declarations) Adds a retained typed presentation rule and applies all rules in source order.booleansampleAnimations(double animationTimeSeconds) Samples every retained SVG attribute animation against a view animation clock.select(GuiSvgSelector selector)
-
Method Details
-
parse
-
builder
-
root
-
nodes
-
byId
-
select
-
rule
Adds a retained typed presentation rule and applies all rules in source order.- Returns:
- this document
-
append
-
remove
-
hitTest
Performs transformed retained hit testing for SVG viewport, shape, path, line, polyline, polygon, image, and text geometry. Visibility and pointer-event suppression are honored; nodes later in paint order win. -
markup
-
sampleAnimations
public boolean sampleAnimations(double animationTimeSeconds) Samples every retained SVG attribute animation against a view animation clock.The document generation changes only if at least one serialized attribute value changes. RenderLib invokes this automatically when the document is painted; it is public so a caller can drive a detached document with another retained clock.
- Parameters:
animationTimeSeconds- clock time in seconds- Returns:
- whether the sampled SVG markup changed
-
cacheKey
-
generation
public long generation() -
hintWidth
public float hintWidth() -
hintHeight
public float hintHeight() -
load
-