From b4799373f7fb9c8faec813e78a955438301cb9d1 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 25 Jul 2024 14:56:49 +0200 Subject: Add sprite set size/height functions, option to hide window decorations in create window --- include/mgl/graphics/sprite.h | 4 ++++ include/mgl/window/window.h | 1 + 2 files changed, 5 insertions(+) (limited to 'include') diff --git a/include/mgl/graphics/sprite.h b/include/mgl/graphics/sprite.h index 64d9c03..0193c4c 100644 --- a/include/mgl/graphics/sprite.h +++ b/include/mgl/graphics/sprite.h @@ -25,6 +25,10 @@ void mgl_sprite_set_position(mgl_sprite *self, mgl_vec2f position); void mgl_sprite_set_color(mgl_sprite *self, mgl_color color); void mgl_sprite_set_rotation(mgl_sprite *self, float degrees); void mgl_sprite_set_origin(mgl_sprite *self, mgl_vec2f origin); +/* This only has an effect if the sprite has a texture set */ +void mgl_sprite_set_size(mgl_sprite *self, mgl_vec2f size); +/* This only has an effect if the sprite has a texture set. Scales width in proportion */ +void mgl_sprite_set_height(mgl_sprite *self, float height); void mgl_sprite_draw(mgl_context *context, mgl_sprite *sprite); #endif /* MGL_SPRITE_H */ diff --git a/include/mgl/window/window.h b/include/mgl/window/window.h index 90bbd3d..eb7f587 100644 --- a/include/mgl/window/window.h +++ b/include/mgl/window/window.h @@ -75,6 +75,7 @@ typedef struct { bool hidden; /* false by default */ bool override_redirect; /* false by default */ bool support_alpha; /* support alpha for the window, false by default */ + bool hide_decorations; /* this is a hint, it may be ignored by the window manager, false by default */ mgl_color background_color; /* default: black */ const char *class_name; mgl_window_type window_type; /* default: normal */ -- cgit v1.2.3