diff options
author | Ansis Brammanis <brammanis@gmail.com> | 2016-01-14 17:11:25 -0800 |
---|---|---|
committer | Ansis Brammanis <brammanis@gmail.com> | 2016-01-19 18:20:54 -0800 |
commit | 26faa6a5ade54c0a423aab84106876dc59be868f (patch) | |
tree | 16c476ea5bc3d2084cd07e7051eb5d55d10d5be2 /test/sprite/sprite_store.cpp | |
parent | 9b62661b07e86fc1d64e308fde3e15527c1cd8c8 (diff) | |
download | qtlocation-mapboxgl-26faa6a5ade54c0a423aab84106876dc59be868f.tar.gz |
[core][ios][osx][android] fix icons with non-integer width/height
ref #3031
ref #2198
For example, an icon that has:
- a pixel width of 10
- a pixel ratio of 3
- a scaled with of 3.333
is now supported.
Diffstat (limited to 'test/sprite/sprite_store.cpp')
-rw-r--r-- | test/sprite/sprite_store.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/sprite/sprite_store.cpp b/test/sprite/sprite_store.cpp index 8f9aebbe67..5056b89cb7 100644 --- a/test/sprite/sprite_store.cpp +++ b/test/sprite/sprite_store.cpp @@ -13,9 +13,9 @@ using namespace mbgl; TEST(SpriteStore, SpriteStore) { FixtureLog log; - const auto sprite1 = std::make_shared<SpriteImage>(8, 8, 2, std::string(16 * 16 * 4, '\0')); - const auto sprite2 = std::make_shared<SpriteImage>(8, 8, 2, std::string(16 * 16 * 4, '\0')); - const auto sprite3 = std::make_shared<SpriteImage>(8, 8, 2, std::string(16 * 16 * 4, '\0')); + const auto sprite1 = std::make_shared<SpriteImage>(16, 16, 2, std::string(16 * 16 * 4, '\0')); + const auto sprite2 = std::make_shared<SpriteImage>(16, 16, 2, std::string(16 * 16 * 4, '\0')); + const auto sprite3 = std::make_shared<SpriteImage>(16, 16, 2, std::string(16 * 16 * 4, '\0')); using Sprites = std::map<std::string, std::shared_ptr<const SpriteImage>>; SpriteStore store(1); @@ -90,8 +90,8 @@ TEST(SpriteStore, OtherPixelRatio) { } TEST(SpriteStore, Multiple) { - const auto sprite1 = std::make_shared<SpriteImage>(8, 8, 2, std::string(16 * 16 * 4, '\0')); - const auto sprite2 = std::make_shared<SpriteImage>(8, 8, 2, std::string(16 * 16 * 4, '\0')); + const auto sprite1 = std::make_shared<SpriteImage>(16, 16, 2, std::string(16 * 16 * 4, '\0')); + const auto sprite2 = std::make_shared<SpriteImage>(16, 16, 2, std::string(16 * 16 * 4, '\0')); using Sprites = std::map<std::string, std::shared_ptr<const SpriteImage>>; SpriteStore store(1); @@ -109,8 +109,8 @@ TEST(SpriteStore, Multiple) { TEST(SpriteStore, Replace) { FixtureLog log; - const auto sprite1 = std::make_shared<SpriteImage>(8, 8, 2, std::string(16 * 16 * 4, '\0')); - const auto sprite2 = std::make_shared<SpriteImage>(8, 8, 2, std::string(16 * 16 * 4, '\0')); + const auto sprite1 = std::make_shared<SpriteImage>(16, 16, 2, std::string(16 * 16 * 4, '\0')); + const auto sprite2 = std::make_shared<SpriteImage>(16, 16, 2, std::string(16 * 16 * 4, '\0')); using Sprites = std::map<std::string, std::shared_ptr<const SpriteImage>>; SpriteStore store(1); @@ -126,8 +126,8 @@ TEST(SpriteStore, Replace) { TEST(SpriteStore, ReplaceWithDifferentDimensions) { FixtureLog log; - const auto sprite1 = std::make_shared<SpriteImage>(8, 8, 2, std::string(16 * 16 * 4, '\0')); - const auto sprite2 = std::make_shared<SpriteImage>(9, 9, 2, std::string(18 * 18 * 4, '\0')); + const auto sprite1 = std::make_shared<SpriteImage>(16, 16, 2, std::string(16 * 16 * 4, '\0')); + const auto sprite2 = std::make_shared<SpriteImage>(18, 18, 2, std::string(18 * 18 * 4, '\0')); using Sprites = std::map<std::string, std::shared_ptr<const SpriteImage>>; SpriteStore store(1); |