diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-08-03 23:23:13 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-08-03 23:23:13 +0200 |
commit | 61bfb22f27f5216f989c023a5e39fad7e356d2d6 (patch) | |
tree | 9d7a8a760ace272739f651a2f4208326731a6fe7 /src/math/size.h | |
parent | 5e637ca0288ddd631ec33e1d620cd4a73bcdc2be (diff) | |
download | colobot-61bfb22f27f5216f989c023a5e39fad7e356d2d6.tar.gz colobot-61bfb22f27f5216f989c023a5e39fad7e356d2d6.tar.bz2 colobot-61bfb22f27f5216f989c023a5e39fad7e356d2d6.zip |
Basic font rendering
- added basic font rendering
- minor refactoring & fixes
Diffstat (limited to 'src/math/size.h')
-rw-r--r-- | src/math/size.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/math/size.h b/src/math/size.h index 781b9a4..03cffaa 100644 --- a/src/math/size.h +++ b/src/math/size.h @@ -20,6 +20,9 @@ #pragma once +#include "math/point.h" + + // Math module namespace namespace Math { @@ -58,6 +61,12 @@ struct Size { w = h = 0.0f; } + + //! Converts Point to Size + inline static Math::Size FromPoint(Math::Point p) + { + return Math::Size(p.x, p.y); + } }; // struct Size |