[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.
This commit is contained in:
Ansis Brammanis
2016-01-14 17:11:25 -08:00
parent 9b62661b07
commit 26faa6a5ad
9 changed files with 39 additions and 43 deletions

View File

@@ -106,10 +106,10 @@ TEST(Sprite, SpriteImageCreation1_5x) {
ASSERT_TRUE(sprite2.get());
EXPECT_EQ(24, sprite2->width);
EXPECT_EQ(24, sprite2->height);
EXPECT_EQ(36, sprite2->pixelWidth);
EXPECT_EQ(36, sprite2->pixelHeight);
EXPECT_EQ(35, sprite2->pixelWidth);
EXPECT_EQ(35, sprite2->pixelHeight);
EXPECT_EQ(1.5, sprite2->pixelRatio);
EXPECT_EQ(0x134A530C742DD141u, test::crc64(sprite2->data));
EXPECT_EQ(14312995667113444493u, test::crc64(sprite2->data));
}
TEST(Sprite, SpriteParsing) {