diff --git a/public/usage-examples-images-gifs/graphics/fill_triangle-1-basic-red.png b/public/usage-examples-images-gifs/graphics/fill_triangle-1-basic-red.png new file mode 100644 index 00000000..4fca00cd Binary files /dev/null and b/public/usage-examples-images-gifs/graphics/fill_triangle-1-basic-red.png differ diff --git a/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.cpp b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.cpp new file mode 100644 index 00000000..2e037106 --- /dev/null +++ b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.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 diff --git a/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.cs b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.cs new file mode 100644 index 00000000..08729b6f --- /dev/null +++ b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.cs @@ -0,0 +1,11 @@ +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-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..390e1586 --- /dev/null +++ b/src/assets/usage-examples-code/graphics/fill_triangle/fill_triangle-1-basic-red.txt @@ -0,0 +1,3 @@ +### 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