[core] Add stretches and content to style::Image

This commit is contained in:
Konstantin Käfer
2019-12-09 15:09:42 +01:00
committed by Alexander Shalamov
parent 4b171cccf1
commit 62b0f4cde2
10 changed files with 229 additions and 43 deletions

View File

@@ -763,7 +763,7 @@ void NativeMapView::addAnnotationIcon(JNIEnv& env, const jni::String& symbol, ji
mbgl::PremultipliedImage premultipliedImage({ static_cast<uint32_t>(w), static_cast<uint32_t>(h) });
if (premultipliedImage.bytes() != uint32_t(size)) {
throw mbgl::util::SpriteImageException("Sprite image pixel count mismatch");
throw mbgl::util::StyleImageException("Annotation icon image pixel count mismatch");
}
jni::GetArrayRegion(env, *jpixels, 0, size, reinterpret_cast<jbyte*>(premultipliedImage.data.get()));