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
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using SplashKitSDK;

namespace BitmapBoundingCircleExample
{
public class Program
{
public static void Main()
{
SplashKit.OpenWindow("Bitmap Bounding Circle", 800, 600);

Bitmap vertical_bitmap = SplashKit.LoadBitmap("vertical_bitmap", "image1.jpeg");
Bitmap horizontal_bitmap = SplashKit.LoadBitmap("horizontal_bitmap", "image2.png");

Circle vert_bitmap_circle = SplashKit.BitmapBoundingCircle(vertical_bitmap, SplashKit.PointAt(210, 210));
Circle hori_bitmap_circle = SplashKit.BitmapBoundingCircle(horizontal_bitmap, SplashKit.PointAt(580, 400));

while (!SplashKit.QuitRequested())
{
SplashKit.ProcessEvents();
SplashKit.ClearScreen(Color.White);

SplashKit.DrawBitmap(vertical_bitmap, 141, 60);
SplashKit.DrawBitmap(horizontal_bitmap, 480, 344);

SplashKit.DrawCircle(Color.Black, vert_bitmap_circle);
SplashKit.DrawCircle(Color.Black, hori_bitmap_circle);

SplashKit.RefreshScreen();
}
SplashKit.CloseAllWindows();
}
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using SplashKitSDK;
using static SplashKitSDK.SplashKit;

OpenWindow("Bitmap Bounding Circle", 800, 600);

Bitmap vertical_bitmap = LoadBitmap("vertical_bitmap", "image1.jpeg");
Bitmap horizontal_bitmap = LoadBitmap("horizontal_bitmap", "image2.png");

Circle vert_bitmap_circle = BitmapBoundingCircle(vertical_bitmap, PointAt(210, 210));
Circle hori_bitmap_circle = BitmapBoundingCircle(horizontal_bitmap, PointAt(580, 400));

while (!QuitRequested())
{
ProcessEvents();
ClearScreen(ColorWhite());

DrawBitmap(vertical_bitmap, 141, 60);
DrawBitmap(horizontal_bitmap, 480, 344);

DrawCircle(ColorBlack(), vert_bitmap_circle);
DrawCircle(ColorBlack(), hori_bitmap_circle);

RefreshScreen();
}
CloseAllWindows();
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include "splashkit.h"

int main()
{
open_window("Bitmap Bounding Circle", 800, 600);

bitmap vertical_bitmap = load_bitmap("vertical_bitmap", "image1.jpeg");
bitmap horizontal_bitmap = load_bitmap("horizontal_bitmap", "image2.png");

circle vert_bitmap_circle = bitmap_bounding_circle(vertical_bitmap, point_at(210, 210));
circle hori_bitmap_circle = bitmap_bounding_circle(horizontal_bitmap, point_at(580, 400));

while (!quit_requested())
{
process_events();
clear_screen(color_white());

draw_bitmap(vertical_bitmap, 141, 60);
draw_bitmap(horizontal_bitmap, 480, 344);

draw_circle(color_black(), vert_bitmap_circle);
draw_circle(color_black(), hori_bitmap_circle);

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

open_window("Bitmap Bounding Circle", 800, 600)

vertical_bitmap = load_bitmap("vertical_bitmap", "image1.jpeg")
horizontal_bitmap = load_bitmap("horizontal_bitmap", "image2.png")

vert_bitmap_circle = bitmap_bounding_circle(vertical_bitmap, point_at(210, 210))
hori_bitmap_circle = bitmap_bounding_circle(horizontal_bitmap, point_at(580, 400))

while not quit_requested():
process_events()
clear_screen_to_white()

draw_bitmap(vertical_bitmap, 141, 60)
draw_bitmap(horizontal_bitmap, 480, 344)

draw_circle_record(color_black(), vert_bitmap_circle)
draw_circle_record(color_black(), hori_bitmap_circle)

refresh_screen()

close_all_windows()
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Draw bitmaps surrounded by circles

:::note
To test this example code you can download these [**Resources**](/usage-examples/graphics/bitmap_bounding_circle-1-example-resources.zip).
:::
21 changes: 6 additions & 15 deletions src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,20 @@ bash <(curl -s https://raw.githubusercontent.com/splashkit/skm/master/install-sc

<CardGrid>
<Card title="Easy Integration" icon="carbon:ibm-cloud-pak-integration">
SplashKit SDK offers seamless integration with your existing development
environment, making it easy to incorporate powerful graphics and game
development capabilities into your projects.
SplashKit provides developers with an easy integration method to add
graphics and game development capabilities through a straightforward setup process.
</Card>
<Card title="Cross-Platform Support:" icon="system-uicons:airplay">
Develop games and applications that run on multiple platforms, including
Windows, macOS, Linux, and a few more using a single codebase with SplashKit
SDK. Supports **C++, C# and python** .
Develop games and apps for Windows, macOS, Linux, and more using a single SplashKit codebase. Platform supports development with **C++, C# and Python** programming language .
</Card>
<Card title="Rich Graphics and Animation" icon="clarity:animation-solid">
Create stunning visuals and captivating animations with SplashKit's
comprehensive set of graphics and animation tools. Bring your ideas to life
with ease.
SplashKit provides users with a complete set of graphics and animation tools to create professional-looking visuals and smooth animations.
</Card>
<Card title="Game Development Made Simple" icon="icon-park-outline:game-two">
Whether you're a beginner or an experienced game developer, SplashKit SDK
provides a user-friendly interface and a wide range of features to simplify
the game development process.
The SplashKit SDK provides developers with an easy-to-use interface and robust capabilities which enable game development at all skill levels.
</Card>
<Card title="Extensive Documentation" icon="iconoir:google-docs">
Access detailed documentation and tutorials to help you get started quickly
and make the most out of SplashKit SDK. Learn at your own pace and explore
the vast possibilities.
The SplashKit SDK provides complete documentation and tutorial content to enable fast development and independent learning of all available features.
</Card>
<Card title="Continuous Updates and Support" icon="grommet-icons:troubleshoot">
<LinkCard
Expand Down