Skip to content
Version 2.35.0
↓ Get the launcher

SlicedImageElement record

A plugin picture drawn as a horizontal 3-slice frame (framework 2.34.0) — e.g. boss-bar frame art that follows a width-resizable window. Three PNGs: the Left and Right caps keep their native pixel width, the Middle piece is stretched to fill the rest (give it identical columns, so a stretch is lossless). The element fills the width its parent hands it (min width = both caps) at a fixed Height.

Crisp: the pieces load with no mip chain and bilinear filtering, so at UI scale 1 every texel lands on one pixel. Each Func is read ONCE when the window is built — return cached arrays (load the PNG bytes once).

A missing / undecodable piece is simply not drawn (the slot keeps its size).

public record SlicedImageElement : IEquatable<HudElement>
name description
SlicedImageElement(…) A plugin picture drawn as a horizontal 3-slice frame (framework 2.34.0) — e.g. boss-bar frame art that follows a width-resizable window. Three PNGs: the Left and Right caps keep their native pixel width, the Middle piece is stretched to fill the rest (give it identical columns, so a stretch is lossless). The element fills the width its parent hands it (min width = both caps) at a fixed Height.
Height { get; set; } Frame height in px (also the drawn height of every piece).
Left { get; set; } Left cap PNG (drawn at its native width).
Middle { get; set; } Middle PNG, stretched horizontally between the caps.
Right { get; set; } Right cap PNG (drawn at its native width).