From 641a77ce689723b5e86c2204d597a7f77b67473c Mon Sep 17 00:00:00 2001 From: Wills2022 <102498796+Wills2022@users.noreply.github.com> Date: Thu, 12 Sep 2024 11:35:17 +0800 Subject: [PATCH] Update images.h --- coresdk/src/coresdk/images.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/coresdk/src/coresdk/images.h b/coresdk/src/coresdk/images.h index 35f8397b..56ac2fd9 100644 --- a/coresdk/src/coresdk/images.h +++ b/coresdk/src/coresdk/images.h @@ -34,6 +34,21 @@ namespace splashkit_lib */ bitmap load_bitmap(string name, string filename); + /** + * Loads and returns a bitmap. The supplied `image` is a base64 encoded + * .png file. The supplied `name` indicates the + * name to use to refer to this Bitmap in SplashKit. The `bitmap` can then + * be retrieved by passing this `name` to the `bitmap_named` function. + * + * @param name The name of the bitmap resource in SplashKit + * @param image The base64 encoded image + * @return The loaded bitmap + * + * @attribute class bitmap + * @attribute constructor true + */ + bitmap load_bitmap_base64(string name, const char * image); + /** * Lets you test if bitmap value is valid. This will return true when it is a valid bitmap. * @@ -233,6 +248,15 @@ namespace splashkit_lib */ void draw_bitmap(string name, double x, double y, drawing_options opts); + /** + * Draw a pre-defined base64 encoded png file to centre of the the active window + * @param x the x location which represents where the bitmap + * will be drawn + * @param y the y location which represents where the bitmap + * will be drawn + */ + void draw_splash_screen(double x, double y); + /** * Creates a new bitmap that you can draw to. Initially the bitmap will * be transparent.