Skip to content

Add usage example for draw_rectangle_on_bitmap#730

Open
jasveena15 wants to merge 7 commits intothoth-tech:mainfrom
jasveena15:doc/usage-example-draw-rectangle-on-bitmap
Open

Add usage example for draw_rectangle_on_bitmap#730
jasveena15 wants to merge 7 commits intothoth-tech:mainfrom
jasveena15:doc/usage-example-draw-rectangle-on-bitmap

Conversation

@jasveena15
Copy link
Copy Markdown

Description

This pull request adds a new usage example for the draw_rectangle_on_bitmap function.

The example shows how to draw rectangles onto a bitmap first and then display that bitmap in a window. This helps demonstrate the difference between drawing to an off-screen bitmap and drawing directly to the screen.

Type of change

  • Documentation (update or new)

How Has This Been Tested?

The example was tested locally in all required languages:

  • C++
  • C# top-level
  • C# OOP
  • Python

The output was verified to ensure:

  • the window opens correctly
  • the bitmap is created and displayed
  • the rectangles are drawn onto the bitmap
  • the example appears correctly on the local SplashKit website

Reproduction steps:

  1. Place the usage example files in public/usage-examples/graphics/
  2. Run the example files locally using SplashKit Manager
  3. Run npm run dev
  4. Open the local website and navigate to the draw_rectangle_on_bitmap API page
  5. Confirm the usage example appears under the correct function page with all language tabs

Testing Checklist

  • Tested in latest Chrome
  • Tested in latest Firefox
  • npm run build
  • npm run preview

Checklist

If involving code

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

If modified config files

  • I have checked the following files for changes:
    • package.json
    • astro.config.mjs
    • netlify.toml
    • docker-compose.yml
    • custom.css

Folders and Files Added/Modified

  • Added:

    • public/usage-examples/graphics/draw_rectangle_on_bitmap-1-basic.cpp
    • public/usage-examples/graphics/draw_rectangle_on_bitmap-1-basic.py
    • public/usage-examples/graphics/draw_rectangle_on_bitmap-1-basic-top-level.cs
    • public/usage-examples/graphics/draw_rectangle_on_bitmap-1-basic-oop.cs
    • public/usage-examples/graphics/draw_rectangle_on_bitmap-1-basic.txt
    • public/usage-examples/graphics/draw_rectangle_on_bitmap-1-basic.png
  • Modified:

    • None

Additional Notes

This example was designed to be beginner-friendly and visually clear for usage example readers. It focuses on a simple representative overload of draw_rectangle_on_bitmap using x, y, width, and height.

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 15, 2026

Deploy Preview for splashkit failed.

Name Link
🔨 Latest commit e872f9e
🔍 Latest deploy log https://app.netlify.com/projects/splashkit/deploys/69e07f2960d3fb00080f1f2a

Copy link
Copy Markdown

@abdullah12121212 abdullah12121212 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Copy link
Copy Markdown

@Sparsh300 Sparsh300 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. Please just confirm whether the filenames should use the standard -example naming instead of -basic as per CONTRIBUTING.mdx.

@jasveena15
Copy link
Copy Markdown
Author

Looks good overall. Please just confirm whether the filenames should use the standard -example naming instead of -basic as per CONTRIBUTING.mdx.

i guess it was just overlooked , i have renamed the files anyways , thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants