Table of Contents

Interface IAtlasPacker

Namespace
KernSmith.Atlas
Assembly
KernSmith.dll

Packs glyph rectangles into texture atlas pages using a bin-packing algorithm.

public interface IAtlasPacker

Methods

Pack(IReadOnlyList<GlyphRect>, int, int)

Packs glyphs into pages that fit within the given max size.

PackResult Pack(IReadOnlyList<GlyphRect> glyphs, int maxWidth, int maxHeight)

Parameters

glyphs IReadOnlyList<GlyphRect>

The glyph sizes to pack.

maxWidth int

Max page width in pixels.

maxHeight int

Max page height in pixels.

Returns

PackResult

Where each glyph was placed and how many pages were needed.