aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Sprite.h
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-11 14:36:44 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-11 14:36:44 +0100
commit2bcd6ece912ab0a140f9d925718e8787879d1ed7 (patch)
treeea13906ba7afcd519579639b3b2d620628151fe1 /src/crepe/api/Sprite.h
parente6a5bb579d0969245f34119ef2489f47039c523e (diff)
adjusted aspect ratio
Diffstat (limited to 'src/crepe/api/Sprite.h')
-rw-r--r--src/crepe/api/Sprite.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/crepe/api/Sprite.h b/src/crepe/api/Sprite.h
index 7e9812d..14a873b 100644
--- a/src/crepe/api/Sprite.h
+++ b/src/crepe/api/Sprite.h
@@ -92,6 +92,15 @@ private:
//! Reads the all the variables plus the mask
friend class AnimatorSystem;
+
+ /**
+ * \aspect_ratio the ratio of the sprite image
+ *
+ * - this value will only be set by the \c Animator component for the ratio of the Animation
+ * - if \c Animator component is not added it will not use this ratio (because 0) and will use aspect_ratio of the Asset.
+ */
+ float aspect_ratio = 0;
+
struct Rect {
int w = 0;
int h = 0;