MenuRenderer¶
Namespace Nfty.Core.Publish in assembly Nfty.Core.
Renders a rolled AssetTicket back into pixels from the .mnu it was rolled against — the read-side counterpart to MenuWriter. Nfty.Ticket is deliberately dependency-free and decodes no pixels, so the half of "roll a ticket, then render it" that touches ImageSharp lives here rather than there, the same split MenuWriter's own remarks describe for writing.
Remarks¶
This is the ONE render loop: serve and MenuFidelityTests both call it rather than each carrying their own copy, because two renderers is how "the client cooks the same dish the server rolled" stops being true.
Methods¶
Render(MenuArchive, AssetTicket)¶
Renders a ticket: plates it into draws (Plating.Plate()), crops each layer's art out of the Menu's atlas (or takes it whole, in loose mode), colorizes Dynamic/Static layers and leaves Custom ones as-is, then composites.
Parameters
menu(MenuArchive) - The Menu the ticket was rolled against.ticket(AssetTicket) - The roll to render.
Returns. The composited asset. The caller owns and disposes it.
Exceptions
KeyNotFoundException- SeePlating.Plate().FormatException- SeePlating.Plate().