feat: Circle/RoundedRectangle-Zeichenbefehle im Canvas-Backend, Fehlzeitenkalender-Kacheln größer
CI / build-and-test (push) Waiting to run
CI / build-and-test (push) Waiting to run
Neue DrawingCommand-Primitives DrawCircle und DrawRoundedRectangle (SVG-Rendering plus FLOWDRAWBOX-Paginierung). Anwesenheitskalender nutzt RoundedRectangle für die Tageskacheln und verkleinert Monatsabstand/Kachel-Innenabstand, damit die Kacheln den Rasterplatz sichtbar besser ausfüllen. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,10 @@ public sealed record DrawLine(float X1, float Y1, float X2, float Y2,
|
||||
string Color = "#000000", float StrokeWidth = 1) : DrawingCommand;
|
||||
public sealed record DrawRectangle(float X, float Y, float Width, float Height,
|
||||
string StrokeColor = "#000000", float StrokeWidth = 1, string FillColor = "none") : DrawingCommand;
|
||||
public sealed record DrawRoundedRectangle(float X, float Y, float Width, float Height, float CornerRadius,
|
||||
string StrokeColor = "#000000", float StrokeWidth = 1, string FillColor = "none") : DrawingCommand;
|
||||
public sealed record DrawCircle(float CenterX, float CenterY, float Radius,
|
||||
string StrokeColor = "#000000", float StrokeWidth = 1, string FillColor = "none") : DrawingCommand;
|
||||
public sealed record DrawImage(float X, float Y, float Width, float Height, byte[] Data, string MimeType) : DrawingCommand;
|
||||
/// <summary>Declarative drawing supplied by an external data provider. Coordinates use the template layout unit; font sizes use points.</summary>
|
||||
public sealed record DrawingValue(IReadOnlyList<DrawingCommand> Commands, float ContentHeight)
|
||||
@@ -56,6 +60,13 @@ public sealed class DrawingCanvas
|
||||
public void DrawRectangle(float x, float y, float width, float height, string strokeColor = "#000000",
|
||||
float strokeWidth = 1, string fillColor = "none") =>
|
||||
_commands.Add(new LehrerApp.Templating.DrawRectangle(x, y, width, height, strokeColor, strokeWidth, fillColor));
|
||||
public void DrawRoundedRectangle(float x, float y, float width, float height, float cornerRadius,
|
||||
string strokeColor = "#000000", float strokeWidth = 1, string fillColor = "none") =>
|
||||
_commands.Add(new LehrerApp.Templating.DrawRoundedRectangle(x, y, width, height, cornerRadius,
|
||||
strokeColor, strokeWidth, fillColor));
|
||||
public void DrawCircle(float centerX, float centerY, float radius, string strokeColor = "#000000",
|
||||
float strokeWidth = 1, string fillColor = "none") =>
|
||||
_commands.Add(new LehrerApp.Templating.DrawCircle(centerX, centerY, radius, strokeColor, strokeWidth, fillColor));
|
||||
public void DrawImage(float x, float y, float width, float height, byte[] data, string mimeType) =>
|
||||
_commands.Add(new LehrerApp.Templating.DrawImage(x, y, width, height, data, mimeType));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user