using LehrerApp.Core.Services; using LehrerApp.Templating; namespace LehrerApp.Desktop.Services; /// Brücke von den Klausurdaten zur Punktetabelle des Deckblatts. Gezeichnet wird in /// (Vorlagenbibliothek), damit der Vorlagen-Designer dieselbe /// Tabelle in der Vorschau zeigt. public static class ExamPointsTableDrawingBuilder { public const string PlaceholderName = ExamPointsTableDrawing.PlaceholderName; public static DrawingValue Build(IReadOnlyList columns, float contentWidth = 170, float millimeterScale = 1) => ExamPointsTableDrawing.Build( columns.Select(c => new ExamPointsTableColumn(c.Number, c.MaxPoints, c.IsBonus, c.AchievedPoints)).ToList(), contentWidth, millimeterScale); public static int ColumnsPerBlock(float contentWidth, float millimeterScale = 1) => ExamPointsTableDrawing.ColumnsPerBlock(contentWidth, millimeterScale); }