MCPcopy Create free account
hub / github.com/antvis/F2Native / VectorToJFloatArray

Function VectorToJFloatArray

core/android/JNIUtil.cpp:340–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338}
339
340ScopedJavaLocalRef<jfloatArray> VectorToJFloatArray(JNIEnv *env, const std::vector<float> &params) {
341 auto jArray = ScopedJavaLocalRef<jfloatArray>(env, env->NewFloatArray(params.size()));
342 env->SetFloatArrayRegion(jArray.obj(), 0, params.size(), params.data());
343 return jArray;
344}
345
346ScopedJavaLocalRef<jintArray> VectorToJIntArray(JNIEnv *env, const std::vector<int> &params) {
347 auto jArray = ScopedJavaLocalRef<jintArray>(env, env->NewIntArray(params.size()));

Callers 2

GetGradientPositionsMethod · 0.85
SetLineDashMethod · 0.85

Calls 2

sizeMethod · 0.45
objMethod · 0.45

Tested by

no test coverage detected