Allow setting frustum offset to not render edges of the screen (#3676)
Co-authored-by: Bart Louwers <bart@emeel.net>
This commit is contained in:
@@ -1320,6 +1320,14 @@ void NativeMapView::enableRenderingStatsView(JNIEnv&, jni::jboolean value) {
|
||||
map->enableRenderingStatsView(value);
|
||||
}
|
||||
|
||||
void NativeMapView::setFrustumOffset(JNIEnv& env, const jni::Object<RectF>& padding) {
|
||||
mbgl::EdgeInsets offset = {RectF::getTop(env, padding),
|
||||
RectF::getLeft(env, padding),
|
||||
RectF::getBottom(env, padding),
|
||||
RectF::getRight(env, padding)};
|
||||
map->setFrustumOffset(offset);
|
||||
}
|
||||
|
||||
// Static methods //
|
||||
|
||||
void NativeMapView::registerNative(jni::JNIEnv& env) {
|
||||
@@ -1442,7 +1450,8 @@ void NativeMapView::registerNative(jni::JNIEnv& env) {
|
||||
METHOD(&NativeMapView::getTileLodZoomShift, "nativeGetTileLodZoomShift"),
|
||||
METHOD(&NativeMapView::triggerRepaint, "nativeTriggerRepaint"),
|
||||
METHOD(&NativeMapView::isRenderingStatsViewEnabled, "nativeIsRenderingStatsViewEnabled"),
|
||||
METHOD(&NativeMapView::enableRenderingStatsView, "nativeEnableRenderingStatsView"));
|
||||
METHOD(&NativeMapView::enableRenderingStatsView, "nativeEnableRenderingStatsView"),
|
||||
METHOD(&NativeMapView::setFrustumOffset, "nativeSetFrustumOffset"));
|
||||
}
|
||||
|
||||
void NativeMapView::onRegisterShaders(gfx::ShaderRegistry&) {};
|
||||
|
||||
Reference in New Issue
Block a user