diff --git a/public/usage-examples/graphics/draw_line-2-example-oop.cs b/public/usage-examples/graphics/draw_line-2-example-oop.cs new file mode 100644 index 000000000..8bcadf97f --- /dev/null +++ b/public/usage-examples/graphics/draw_line-2-example-oop.cs @@ -0,0 +1,25 @@ +using SplashKitSDK; +using static SplashKitSDK.SplashKit; + +namespace DrawLineExample +{ + public class Program + { + public static void Main() + { + OpenWindow("Draw Line Example", 800, 600); + + while (!QuitRequested()) + { + ProcessEvents(); + ClearScreen(ColorWhite()); + + DrawLine(ColorRed(), 100, 100, 700, 500); + + RefreshScreen(60); + } + + CloseAllWindows(); + } + } +} \ No newline at end of file diff --git a/public/usage-examples/graphics/draw_line-2-example-top-level.cs b/public/usage-examples/graphics/draw_line-2-example-top-level.cs new file mode 100644 index 000000000..0373a50ac --- /dev/null +++ b/public/usage-examples/graphics/draw_line-2-example-top-level.cs @@ -0,0 +1,15 @@ +using static SplashKitSDK.SplashKit; + +OpenWindow("Draw Line Example", 800, 600); + +while (!QuitRequested()) +{ + ProcessEvents(); + ClearScreen(ColorWhite()); + + DrawLine(ColorRed(), 100, 100, 700, 500); + + RefreshScreen(60); +} + +CloseAllWindows(); \ No newline at end of file diff --git a/public/usage-examples/graphics/draw_line-2-example.cpp b/public/usage-examples/graphics/draw_line-2-example.cpp new file mode 100644 index 000000000..2107ef78f --- /dev/null +++ b/public/usage-examples/graphics/draw_line-2-example.cpp @@ -0,0 +1,19 @@ +#include "splashkit.h" + +int main() +{ + open_window("Draw Line Example", 800, 600); + + while (!quit_requested()) + { + process_events(); + clear_screen(COLOR_WHITE); + + draw_line(COLOR_RED, 100, 100, 700, 500); + + refresh_screen(60); + } + + close_all_windows(); + return 0; +} \ No newline at end of file diff --git a/public/usage-examples/graphics/draw_line-2-example.png b/public/usage-examples/graphics/draw_line-2-example.png new file mode 100644 index 000000000..5bc8f94f6 Binary files /dev/null and b/public/usage-examples/graphics/draw_line-2-example.png differ diff --git a/public/usage-examples/graphics/draw_line-2-example.py b/public/usage-examples/graphics/draw_line-2-example.py new file mode 100644 index 000000000..b0be22d1e --- /dev/null +++ b/public/usage-examples/graphics/draw_line-2-example.py @@ -0,0 +1,13 @@ +from splashkit import * + +open_window("Draw Line Example", 800, 600) + +while not quit_requested(): + process_events() + clear_screen_to_white() + + draw_line(color_red(), 100, 100, 700, 500) + + refresh_screen_with_target_fps(60) + +close_all_windows() \ No newline at end of file diff --git a/public/usage-examples/graphics/draw_line-2-example.txt b/public/usage-examples/graphics/draw_line-2-example.txt new file mode 100644 index 000000000..d9586c288 --- /dev/null +++ b/public/usage-examples/graphics/draw_line-2-example.txt @@ -0,0 +1 @@ +Draw a dynamic red line across the screen \ No newline at end of file