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
Empty file.
37 changes: 37 additions & 0 deletions public/usage-examples/graphics/draw_circle-1-example-oop.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using SplashKitSDK;

namespace DrawCircleExample
{
public class Program
{
public static void Main()
{
SplashKit.OpenWindow("Draw Circle Example", 800, 600);

SplashKit.ClearScreen(Color.White);

// Draw a large red filled circle in the center
SplashKit.FillCircle(Color.Red, 400, 300, 100);

// Draw circles with different colors, sizes, and positions
SplashKit.DrawCircle(Color.Blue, 200, 150, 80);
SplashKit.DrawCircle(Color.Green, 600, 150, 60);
SplashKit.DrawCircle(Color.Orange, 200, 450, 70);
SplashKit.DrawCircle(Color.Purple, 600, 450, 65);

// Draw smaller circles with varying colors
for (int i = 0; i < 8; i++)
{
int radius = 20 + i * 5;
int x = 400 + (i - 4) * 80;
int y = 100;
SplashKit.DrawCircle(Color.RandomRGB(255), x, y, radius);
}

SplashKit.RefreshScreen();

SplashKit.Delay(5000);
SplashKit.CloseAllWindows();
}
}
}
28 changes: 28 additions & 0 deletions public/usage-examples/graphics/draw_circle-1-example-top-level.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using static SplashKitSDK.SplashKit;

OpenWindow("Draw Circle Example", 800, 600);

ClearScreen(ColorWhite());

// Draw a large red filled circle in the center
FillCircle(ColorRed(), 400, 300, 100);

// Draw circles with different colors, sizes, and positions
DrawCircle(ColorBlue(), 200, 150, 80);
DrawCircle(ColorGreen(), 600, 150, 60);
DrawCircle(ColorOrange(), 200, 450, 70);
DrawCircle(ColorPurple(), 600, 450, 65);

// Draw smaller circles with varying colors
for (int i = 0; i < 8; i++)
{
int radius = 20 + i * 5;
int x = 400 + (i - 4) * 80;
int y = 100;
DrawCircle(RandomRGBColor(255), x, y, radius);
}

RefreshScreen();

Delay(5000);
CloseAllWindows();
33 changes: 33 additions & 0 deletions public/usage-examples/graphics/draw_circle-1-example.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include "splashkit.h"

int main()
{
open_window("Draw Circle Example", 800, 600);

clear_screen(COLOR_WHITE);

// Draw a large red filled circle in the center
fill_circle(COLOR_RED, 400, 300, 100);

// Draw circles with different colors, sizes, and positions
draw_circle(COLOR_BLUE, 200, 150, 80);
draw_circle(COLOR_GREEN, 600, 150, 60);
draw_circle(COLOR_ORANGE, 200, 450, 70);
draw_circle(COLOR_PURPLE, 600, 450, 65);

// Draw smaller circles with varying colors
for (int i = 0; i < 8; i++)
{
int radius = 20 + i * 5;
int x = 400 + (i - 4) * 80;
int y = 100;
draw_circle(random_rgb_color(255), x, y, radius);
}

refresh_screen();

delay(5000);
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.
26 changes: 26 additions & 0 deletions public/usage-examples/graphics/draw_circle-1-example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from splashkit import *

open_window("Draw Circle Example", 800, 600)

clear_screen(color_white())

# Draw a large red filled circle in the center
fill_circle(color_red(), 400, 300, 100)

# Draw circles with different colors, sizes, and positions
draw_circle(color_blue(), 200, 150, 80)
draw_circle(color_green(), 600, 150, 60)
draw_circle(color_orange(), 200, 450, 70)
draw_circle(color_purple(), 600, 450, 65)

# Draw smaller circles with varying colors
for i in range(8):
radius = 20 + i * 5
x = 400 + (i - 4) * 80
y = 100
draw_circle(random_rgb_color(255), x, y, radius)

refresh_screen()

delay(5000)
close_all_windows()
1 change: 1 addition & 0 deletions public/usage-examples/graphics/draw_circle-1-example.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Circle Showcase