Skip to content

MenuProjection

Namespace Nfty.Core.Formats in assembly Nfty.Core.

public static class MenuProjection

Projects a loaded or peeked CookBook into the image-free MenuBook the roll works on.

Remarks

Cheap: it copies manifest records that are already in memory and opens no image. That is what lets Generator roll through Ticketer without a second walk of its own.

Methods

From(LoadedCookBook)

public static MenuBook From(LoadedCookBook book);

Projects a decoded book. The book keeps ownership of every image in it.

Parameters

  • book (LoadedCookBook) - The loaded book.

Returns. Its image-free form.

From(PeekedCookBook)

public static MenuBook From(PeekedCookBook book);

Projects a manifest-only book.

Parameters

  • book (PeekedCookBook) - The peeked book.

Returns. Its image-free form.

Remarks

MenuBook.PartialAlpha is taken straight from book's own stored CookBookManifest.PartialAlpha here, unlike the LoadedCookBook overload, which recomputes it from pixels. A peeked book decodes no image — that is the whole point of ArchivePeek — so there are no pixels to recompute from, and the same "trust the writer's stamp" rule ArchivePeek already follows for every other flag applies here too.