Graphics
Simple Usage Examples
Draw Circle Record
Concentric Ripple Effect with Colored Circles
The following code shows examples of using Draw Circle to demonstrate how to draw a circle on the screen with different colors and radii, with and without using variables.
Output:
Draw Circle On Bitmap
Creating a Red Planet
The following code demonstrates how to use Draw Circle On Bitmap to create a red planet with surface details using multiple circles.
Output:
Fill Circle
Basic Blue Circle
The following code shows examples of using Fill Circle to show how to draw a filled-in blue circle.
Output:
Fill Circle On Window
Traffic Lights
The following code shows an example of using Fill Circle On Window to display three circles of different colors and placement in a specified window to look like traffic lights.
Output:
Fill Ellipse
Basic Blue Ellipse
The following code shows examples of using Fill Ellipse to show how to draw a filled-in blue ellipse.
Output:
Clover Drawing
The following code shows an example of using Fill Ellipse with different dimensions to draw a three-leaf clover.
Output:
Fill Ellipse On Bitmap
Creating Water Ripples
The following code demonstrates how to use Fill Ellipse On Bitmap to create a water ripple effect using concentric ellipses with varying transparency.
Output:
Clear Screen
Background Color
The following code shows an example of using Clear Screen to change the background color to blue.
Output:
Refresh Screen
House Drawing
The following code shows examples of using Refresh Screen to show how double buffering works.
Output:
Draw Bitmap Named
Basic Bitmap Drawing
The following code shows an example of using Draw Bitmap to display a Bitmap image of the SplashKit logo in a graphics Window.
See the Graphics or Audio Beyond SplashKit guides for help compiling without SplashKit.
Output:
Hello World! This is SplashKit!
The following code shows a fun example of using Draw Bitmap to create a fun animation/video. This example was created by someone that grew up as a “horse girl” and is reminded of the Saddle Club intro theme song (played in this example) every time she creates a new “hello world” program.
Originally created for the programmers.guide website.
Output:
Draw Line
Colourful Starburst
The following code shows examples of using Draw Line to draw a colourful starburst pattern on the screen.
Output:
Draw Line On Bitmap
Drawing a Route on a Map
The following code demonstrates how to use Draw Line On Bitmap to create a simple route between two points on a map.
Output:
Draw Line On Window
Basic Line Drawing
The following code shows examples of using Draw Line On Window to draw a colourful starburst pattern on a specific window.
Output:
Draw Quad
Ninja Star
The following code shows examples of using Draw Quad to show how to draw a 4 sided shape. This example aranges for diamond style shapes into a ninja star pattern.
Output:
Draw Quad On Window
Halved Ninja Star
The following code shows examples of using Draw Quad On Window to show how to draw a 4 sided shape to a specific window. The example extends this Draw Quad usage example to split it across 2 separate windows.
Output:
Fill Quad
Coloured Star
The following code shows examples of using Fill Quad to show how to draw filled-in 4 sided diamond shapes. This example shows a coloured in version of this Draw Quad usage example.
Output:
Fill Quad On Bitmap
Windows OS Logo
The following code demonstrates how to use Fill Quad On Bitmap to create the windows logo using four quads to represent the window panels.
Output:
Fill Quad On Window
Halved Coloured Star
The following code shows examples of using Fill Quad On Window to show how to draw filled-in 4 sided diamond shapes to a specific window. This example shows a filled in version of this Draw Quad On Window usage example.
Output:
Fill Rectangle
Basic Blue Rectangle
The following code shows examples of using Fill Rectangle to show how to draw a filled-in blue rectangle.
Output:
Draw Triangle On Bitmap
Creating a Mountain Peak
The following code demonstrates how to use Draw Triangle On Bitmap to create a simple mountain peak outline against a sky background.
Output:
Fill Triangle
Basic Red Triangle
The following code demonstrates how to use the Fill Triangle function to draw a simple red-colored filled triangle. It creates a triangle with specified coordinates and fills it with red color.
Output:
Fill Triangle On Bitmap
Hooray! A Red Hat
The following code shows an example of using the Fill Triangle On Bitmap function to draw a red triangle on a loaded bitmap.
Output: