[core][ios][osx][android] make SpriteImage accept PremultipliedImage

the SpriteImage constructor signature changes from

SpriteImage(
        uint16_t width, uint16_t height, float pixelRatio,
        std::string&& data, bool sdf = false);

to

SpriteImage(PremultipliedImage&&, float pixelRatio, bool sdf = false)
This commit is contained in:
Ansis Brammanis
2016-01-15 17:39:08 -08:00
parent 26faa6a5ad
commit d34f8eb674
20 changed files with 160 additions and 168 deletions

View File

@@ -165,7 +165,7 @@ void AnnotationManager::removeIcon(const std::string& name) {
double AnnotationManager::getTopOffsetPixelsForIcon(const std::string& name) {
auto sprite = spriteStore.getSprite(name);
return sprite ? -sprite->height / 2 : 0;
return sprite ? -(sprite->image.height / sprite->pixelRatio) / 2 : 0;
}
} // namespace mbgl