[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user