[android] - add support for sdf by exposing sdf confiigurationn when calling MapboxMap#addImage.
This commit is contained in:
@@ -895,14 +895,16 @@ void NativeMapView::removeSource(JNIEnv& env, jni::Object<Source> obj, jlong sou
|
||||
source->removeFromMap(env, obj, *map);
|
||||
}
|
||||
|
||||
void NativeMapView::addImage(JNIEnv& env, jni::String name, jni::Object<Bitmap> bitmap, jni::jfloat scale) {
|
||||
void NativeMapView::addImage(JNIEnv& env, jni::String name, jni::Object<Bitmap> bitmap, jni::jfloat scale, jni::jboolean sdf) {
|
||||
jni::NullCheck(env, &bitmap);
|
||||
mbgl::PremultipliedImage premultipliedImage = Bitmap::GetImage(env, bitmap);
|
||||
|
||||
map->getStyle().addImage(std::make_unique<mbgl::style::Image>(
|
||||
jni::Make<std::string>(env, name),
|
||||
std::move(premultipliedImage),
|
||||
float(scale)));
|
||||
float(scale),
|
||||
sdf)
|
||||
);
|
||||
}
|
||||
|
||||
void NativeMapView::addImages(JNIEnv& env, jni::Array<jni::Object<mbgl::android::Image>> jimages) {
|
||||
|
||||
Reference in New Issue
Block a user