From 11c4d22101ee3de6d50f31e15c503181314e649a Mon Sep 17 00:00:00 2001 From: sharvani28 Date: Thu, 8 Aug 2024 12:53:42 +0000 Subject: [PATCH 1/5] Fill triangle --- .../graphics/fill_triangle/fill_triangle.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cpp diff --git a/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cpp b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cpp new file mode 100644 index 00000000..6a6914e9 --- /dev/null +++ b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cpp @@ -0,0 +1,15 @@ +#include "splashkit.h" + +int main() +{ + open_window("Fill triangle Example", 800, 600); + clear_screen(); + fill_triangle(COLOR_RED, 100, 100, 200, 200, 300, 100); + refresh_screen(); + + delay(5000); + + close_all_windows(); + + return 0; +} \ No newline at end of file From 14e0820ae0b077fc087572c2b62e8d9e7ff2d3ec Mon Sep 17 00:00:00 2001 From: sharvani28 Date: Thu, 8 Aug 2024 13:30:16 +0000 Subject: [PATCH 2/5] Fill triangle --- .../graphics/fill_triangle.png | Bin 0 -> 12192 bytes .../graphics/fill_triangle/fill_triangle.cs | 12 ++++++++++++ .../graphics/fill_triangle/fill_triangle.txt | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 public/usage-examples-images-gifs/graphics/fill_triangle.png create mode 100644 src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cs create mode 100644 src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.txt diff --git a/public/usage-examples-images-gifs/graphics/fill_triangle.png b/public/usage-examples-images-gifs/graphics/fill_triangle.png new file mode 100644 index 0000000000000000000000000000000000000000..4fca00cdae4fb2986d44a9ffc6f777b83741155a GIT binary patch literal 12192 zcmeG?c{r47-_Hy}lcYs<6)7Q8Ldepoh6FRtXu)OshIs>Qu;nQk1cbCHpW^ zlx@g9LZvYnOpGy>VZM9n{r))D_5Sg_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jc!pw=Y&T^2ZEmc%iRSwDYRprFeq* z&PgA;`kf7vC1P)qHD$i?-JBm#Ui8x+I2BQQll)e}zp;UI{3`2tBE$Ozh=dj}bv948 zvgx}$Pj+EoQ^?(Cet37Qpn8T2HhXQ-_aOa%OkMtlliXYW>3TPzpr$hLGr@J`0(~=( z23djS9Sr~a=g)uMj`<(>HvG#uU@7>+zqtQZuS%x#xF?${=tgD5{8BKHQ6lokKdC?P zuWI{`cO?Gqj85STpM{$qo-!J8;2XOw=6|C%@^>})Q@b&L&G>(@;{Ko<{ws69?(<*i zRsK~Se@1ouTXcX8q=~k6c2)H6FNdhVUJifljzK2;xhE%otw!HhBfm@D-Y@yr?MVB<%Msbr}yw5y>nZ;oj?8)Csh9r{9N)D+<^tB{?kQXl(fGY zTv%RR?QCmn+w{3Us*1q3eOr|3P5$_AnwG!sHGem_@yqP&Wd{cb)hKbr>3q<;fbeoz z8~EcNeT@10BuQOok3b-PoZQ^6|NXJZAG-^qzQ@1fcY{E$4}$c5fBN+IvcgSJl26$o znECsUg(I6?9$^e?)c5A z_@K$Y!nRw?2xb_##|-|=3hlGkE9hN*7Wlbpc*Xy3t&%G!j6Are99Z|m4E5^%)oY%`8Y}ZR%9t;_F@vmK(pHAS{ zJEk&N9la8Qqi1UlTL(vc#>EH7>shtw(Nkvg0wM^9*j?5%s!zcbT8uAFg*iVEpvhAV YXch>y>Q@0xeF!>!%<^ddPnhff1**C2iU0rr literal 0 HcmV?d00001 diff --git a/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cs b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cs new file mode 100644 index 00000000..f1a488e3 --- /dev/null +++ b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cs @@ -0,0 +1,12 @@ +using SplashKitSDK; +using static SplashKitSDK.SplashKit; + +OpenWindow("Fill Triangle Example", 800, 600); + +ClearScreen(); +FillTriangle(ColorRed(), 100, 100, 200, 200, 300, 100); +RefreshScreen(); + +Delay(5000); + +CloseAllWindows(); \ No newline at end of file diff --git a/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.txt b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.txt new file mode 100644 index 00000000..66efef45 --- /dev/null +++ b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.txt @@ -0,0 +1,3 @@ +### Fill Triangle + +The following code demonstrates how to use the Fill_Triangle function to draw a simple red colour -filled triangle. It creates a triangle with specified coordinates and fills it with red color. \ No newline at end of file From 370b5b127b8f0e4812c4eab3fd4ef2564f2a704a Mon Sep 17 00:00:00 2001 From: sharvani28 Date: Fri, 9 Aug 2024 01:25:23 +0000 Subject: [PATCH 3/5] Addressed peer review comments: Updated fill_triangle files --- .../graphics/fill_triangle/fill_triangle.cpp | 2 +- .../graphics/fill_triangle/fill_triangle.cs | 3 +-- .../graphics/fill_triangle/fill_triangle.txt | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cpp b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cpp index 6a6914e9..2e037106 100644 --- a/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cpp +++ b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cpp @@ -4,11 +4,11 @@ int main() { open_window("Fill triangle Example", 800, 600); clear_screen(); + fill_triangle(COLOR_RED, 100, 100, 200, 200, 300, 100); refresh_screen(); delay(5000); - close_all_windows(); return 0; diff --git a/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cs b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cs index f1a488e3..08729b6f 100644 --- a/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cs +++ b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cs @@ -2,11 +2,10 @@ using static SplashKitSDK.SplashKit; OpenWindow("Fill Triangle Example", 800, 600); - ClearScreen(); + FillTriangle(ColorRed(), 100, 100, 200, 200, 300, 100); RefreshScreen(); Delay(5000); - CloseAllWindows(); \ No newline at end of file diff --git a/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.txt b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.txt index 66efef45..e2c96140 100644 --- a/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.txt +++ b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.txt @@ -1,3 +1,3 @@ ### Fill Triangle -The following code demonstrates how to use the Fill_Triangle function to draw a simple red colour -filled triangle. It creates a triangle with specified coordinates and fills it with red color. \ No newline at end of file +The following code demonstrates how to use the `Fill_Triangle` function to draw a simple red-colored filled triangle. It creates a triangle with specified coordinates and fills it with red color. \ No newline at end of file From 154c8186cd13451b08bede79108b935ceb76e2c8 Mon Sep 17 00:00:00 2001 From: sharvani28 Date: Wed, 21 Aug 2024 16:04:23 +1000 Subject: [PATCH 4/5] Fill_Triangle- Updated file names as per feedback. --- ...l_triangle.png => fill_triangle-1-basic-red.png} | Bin ...l_triangle.cpp => fill_triangle-1-basic-red.cpp} | 0 ...ill_triangle.cs => fill_triangle-1-basic-red.cs} | 0 .../fill_triangle/fill_triangle-1-basic-red.txt | 3 +++ .../graphics/fill_triangle/fill_triangle.txt | 3 --- 5 files changed, 3 insertions(+), 3 deletions(-) rename public/usage-examples-images-gifs/graphics/{fill_triangle.png => fill_triangle-1-basic-red.png} (100%) rename src/assets/usage-examples-code/graphics/fill_triangle/{fill_triangle.cpp => fill_triangle-1-basic-red.cpp} (100%) rename src/assets/usage-examples-code/graphics/fill_triangle/{fill_triangle.cs => fill_triangle-1-basic-red.cs} (100%) create mode 100644 src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.txt delete mode 100644 src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.txt diff --git a/public/usage-examples-images-gifs/graphics/fill_triangle.png b/public/usage-examples-images-gifs/graphics/fill_triangle-1-basic-red.png similarity index 100% rename from public/usage-examples-images-gifs/graphics/fill_triangle.png rename to public/usage-examples-images-gifs/graphics/fill_triangle-1-basic-red.png diff --git a/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cpp b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.cpp similarity index 100% rename from src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cpp rename to src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.cpp diff --git a/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cs b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.cs similarity index 100% rename from src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.cs rename to src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.cs diff --git a/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.txt b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.txt new file mode 100644 index 00000000..90ccfb2a --- /dev/null +++ b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.txt @@ -0,0 +1,3 @@ +### Fill Triangle + +The following code demonstrates how to use the [Fill Triangle](/api/graphics#fill-triangle-3) function to draw a simple red-colored filled triangle. It creates a triangle with specified coordinates and fills it with red color. \ No newline at end of file diff --git a/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.txt b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.txt deleted file mode 100644 index e2c96140..00000000 --- a/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle.txt +++ /dev/null @@ -1,3 +0,0 @@ -### Fill Triangle - -The following code demonstrates how to use the `Fill_Triangle` function to draw a simple red-colored filled triangle. It creates a triangle with specified coordinates and fills it with red color. \ No newline at end of file From f6cffec8c19fa7d8f28838b081ff3eda7d0f54b1 Mon Sep 17 00:00:00 2001 From: omckeon Date: Thu, 22 Aug 2024 06:38:31 +0000 Subject: [PATCH 5/5] Update heading name in Fill Triangle usage example description. --- .../graphics/fill_triangle/fill_triangle-1-basic-red.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.txt b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.txt index 90ccfb2a..390e1586 100644 --- a/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.txt +++ b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.txt @@ -1,3 +1,3 @@ -### Fill Triangle +### Simple Red Triangle The following code demonstrates how to use the [Fill Triangle](/api/graphics#fill-triangle-3) function to draw a simple red-colored filled triangle. It creates a triangle with specified coordinates and fills it with red color. \ No newline at end of file