Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions public/usage-examples/graphics/draw_line-2-example-oop.cs
Original file line number Diff line number Diff line change
@@ -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();
}
}
}
15 changes: 15 additions & 0 deletions public/usage-examples/graphics/draw_line-2-example-top-level.cs
Original file line number Diff line number Diff line change
@@ -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();
19 changes: 19 additions & 0 deletions public/usage-examples/graphics/draw_line-2-example.cpp
Original file line number Diff line number Diff line change
@@ -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;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions public/usage-examples/graphics/draw_line-2-example.py
Original file line number Diff line number Diff line change
@@ -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()
1 change: 1 addition & 0 deletions public/usage-examples/graphics/draw_line-2-example.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Draw a dynamic red line across the screen