summaryrefslogtreecommitdiff
path: root/platform/android/src/graphics/pointf.cpp
blob: 6e91b81416783bcf76af9da65baa27e30700fd59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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