diff options
Diffstat (limited to 'platform/android/src/graphics/pointf.cpp')
-rw-r--r-- | platform/android/src/graphics/pointf.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/platform/android/src/graphics/pointf.cpp b/platform/android/src/graphics/pointf.cpp new file mode 100644 index 0000000000..6e91b81416 --- /dev/null +++ b/platform/android/src/graphics/pointf.cpp @@ -0,0 +1,20 @@ +#include "pointf.hpp" + +namespace mbgl { +namespace android { + +jni::Object<PointF> PointF::New(jni::JNIEnv& env, float x, float y) { + static auto constructor = PointF::javaClass.GetConstructor<float, float>(env); + return PointF::javaClass.New(env, constructor, x, y); +} + +void PointF::registerNative(jni::JNIEnv& env) { + // Lookup the class + PointF::javaClass = *jni::Class<PointF>::Find(env).NewGlobalRef(env).release(); +} + +jni::Class<PointF> PointF::javaClass; + + +} // namespace android +} // namespace mbgl
\ No newline at end of file |