sealed class Tinman.Engine.Rendering.Util.SpriteData

Derived from

Disposable abstract

An opaque container for prepared sprite image content.

Public / Attributes


public attribute Pad → (get,set)

value : Vec4I

The amount of padding pixels:
Vec4I.X : padding at left edge
Vec4I.Y : padding at top edge
Vec4I.Z : padding at right edge
Vec4I.W : padding at bottom edge

Specifies the amount of padding pixels at the edges of the sprite image.

The whole sprite image will be present in the cache texture, however the textured quadrilateral will only cover the non-padding pixels. Padding is not required when sprites will be rendered pixel-perfectly. Otherwise, color bleeding between adjacent sprites will occur.