Commit Graph

20 Commits

Author SHA1 Message Date
Konstantin Käfer
c66ec8739b show info message when Sprite does not exist 2015-07-08 19:46:03 +02:00
Konstantin Käfer
493c72b1f4 move crc64() to test fixture 2015-07-08 19:46:03 +02:00
Konstantin Käfer
74b744a656 test SpriteAtlas updates when SpriteStore was updated 2015-07-08 19:46:03 +02:00
Konstantin Käfer
0d4cfd5bd6 test for sprite image that doesn't exist 2015-07-08 19:46:02 +02:00
Konstantin Käfer
d37bd549bc make sure that the SpriteStore object correctly replaces the SpriteImages 2015-07-08 19:46:02 +02:00
Konstantin Käfer
32699333e6 add image to odd pixelRatio atlas 2015-07-08 19:46:02 +02:00
Konstantin Käfer
d08ec53a0e add test for fractional pixel ratios 2015-07-08 19:46:02 +02:00
Konstantin Käfer
a57f3ddceb add basic SpriteAtlas test 2015-07-08 19:46:02 +02:00
Konstantin Käfer
746e4d20ee explicitly name the sprite that couldn't be changed 2015-07-08 19:46:02 +02:00
Konstantin Käfer
6271f8e546 mark Image constructor as explicit to avoid accidental implicit argument conversion
when passing a std::string instead of an Image, the parameter gets implicitly and automatically converted (== parsed) to a temporary Image object. Since parsing an Image shouldn't be a frequent operation
2015-07-08 19:46:01 +02:00
Konstantin Käfer
bc41d3cf6d don't restrict pixelRatio in SpriteStore
this is required so that devices that aren't using 1x or 2x (like the iPhone 6 Plus with a pixelRatio of 3x) still show icons, albeit bilinearly scaled to the correct size in the SpriteAtlas
2015-07-08 19:46:01 +02:00
Konstantin Käfer
aa2dcf1968 disallow changing an existing Sprite's size 2015-07-08 19:46:00 +02:00
Konstantin Käfer
086e72afe3 use a 64 bit CRC value instead of std::hash 2015-07-08 19:46:00 +02:00
Konstantin Käfer
d880507f84 add missing headers 2015-07-08 19:46:00 +02:00
Konstantin Käfer
33a3388ccd add API for adding multiple sprites at once 2015-07-08 19:46:00 +02:00
Konstantin Käfer
54aaa43b6d add test for trying to add mismatched SpriteImage 2015-07-08 19:46:00 +02:00
Konstantin Käfer
04d57b8ef2 check for presence of Sprite creation warnings 2015-07-08 19:45:59 +02:00
Konstantin Käfer
a96a8fef76 add a separate SpriteParser object
transforms a JSON and an associated PNG file into individual SpriteImage objects that can be inserted into a SpriteStore
2015-07-08 19:45:59 +02:00
Konstantin Käfer
a68b47b969 ratio => pixelRatio 2015-07-08 19:45:59 +02:00
Konstantin Käfer
7f705da564 Sprite store API 2015-07-08 19:45:59 +02:00