From 997368fe5f7ae8651982d0ba509bb54051b54e34 Mon Sep 17 00:00:00 2001 From: axtloss Date: Sun, 25 Feb 2024 14:42:49 +0100 Subject: Expand rectangle function with fill arg --- fbwarn/src/warn.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'fbwarn/src/warn.c') diff --git a/fbwarn/src/warn.c b/fbwarn/src/warn.c index 1f946cc..1589e48 100644 --- a/fbwarn/src/warn.c +++ b/fbwarn/src/warn.c @@ -6,39 +6,39 @@ int main(void) { char *rectA, *rectB, *rectC, *rectAFree, *rectBFree, *rectCFree, *singleA, *singleB, *singleC; - rectAFree = rectA = strdup("rectangle (x=0,y=0,\nwidth=100,\nheight=100,\ncolor='#5BCEFA')\n"); + rectAFree = rectA = strdup("rectangle (x=0,y=0,\nwidth=100,\nheight=100,\ncolor='#9787CFFF',\nfill=true,\nthickness=1.0)\n"); if (rectA == NULL) return 1; singleA = multiToSingle(rectA); free(rectAFree); - rectBFree = rectB = strdup("rectangle (x=0,y=20,\nwidth=100,\nheight=60,\ncolor='#F5A9B8')\n"); + rectBFree = rectB = strdup("rectangle (x=0,y=20,\nwidth=100,\nheight=60,\ncolor='#88C2B1FF',\nfill=false,\nthickness=5.0)\n"); if (rectB == NULL) return 1; singleB = multiToSingle(rectB); free(rectBFree); - rectCFree = rectC = strdup("rectangle (x=0,y=40,\nwidth=100,\nheight=20,\ncolor='#FFFFFF')\n"); + rectCFree = rectC = strdup("rectangle (x=0,y=40,\nwidth=100,\nheight=20,\ncolor='#BE79A7FF',\nfill=true,\nthickness=3.0)\n"); if (rectC == NULL) return 1; singleC = multiToSingle(rectC); free(rectCFree); - + InitWindow (100, 100, ":3"); while (!WindowShouldClose ()) { + BeginDrawing (); ClearBackground (RAYWHITE); - char *parseA = strdup(singleA); matchFunctionCall(parseA); - + char *parseB = strdup(singleB); matchFunctionCall(parseB); - + char *parseC = strdup(singleC); matchFunctionCall(parseC); - DrawText ("tranmsgenmer", 15, 50, 10, MAROON); + EndDrawing (); } -- cgit v1.2.3