Skip to content

Commit

Permalink
Merge pull request #14 from thoth-tech/main
Browse files Browse the repository at this point in the history
Add Fill Triangle Usage Example
  • Loading branch information
omckeon authored Aug 22, 2024
2 parents f238c52 + d08ec3d commit 32b900b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
@@ -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();
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 32b900b

Please sign in to comment.