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:
yousifd
2025-11-19 20:30:50 +03:00
committed by GitHub
parent e37a39edcc
commit 2809961b09
42 changed files with 408 additions and 50 deletions

View File

@@ -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&) {};