diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-05-19 10:48:11 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-05-19 10:48:36 +0200 |
commit | 13575330f7d32630f6dbf4244405c46b453152fe (patch) | |
tree | c5bc7f3a25774c2d8f6783d77fbd0654e0554acc /include/llmr/util/rect.hpp | |
parent | 24bd0bb667e6c2570838cd64992ffa388e8fb941 (diff) | |
download | qtlocation-mapboxgl-13575330f7d32630f6dbf4244405c46b453152fe.tar.gz |
use sprite atlas
Diffstat (limited to 'include/llmr/util/rect.hpp')
-rw-r--r-- | include/llmr/util/rect.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llmr/util/rect.hpp b/include/llmr/util/rect.hpp index 56bab2c9c9..2e142c3018 100644 --- a/include/llmr/util/rect.hpp +++ b/include/llmr/util/rect.hpp @@ -9,6 +9,11 @@ struct Rect { T x = 0, y = 0; T w = 0, h = 0; + template <typename Number> + Rect operator *(Number value) const { + return Rect(x * value, y * value, w * value, h * value); + } + operator bool() const { return w == 0 || h == 0; } }; } |