| 118 | } |
| 119 | |
| 120 | void setJavaPoint(JNIEnv *env, jobject _point, const cv::Point2f& point) |
| 121 | { |
| 122 | jclass class_PointF = env->FindClass("android/graphics/PointF"); |
| 123 | jfieldID field_x = env->GetFieldID(class_PointF, "x", "F"); |
| 124 | jfieldID field_y = env->GetFieldID(class_PointF, "y", "F"); |
| 125 | assert(class_PointF != nullptr); |
| 126 | assert(field_x != nullptr && field_y != nullptr); |
| 127 | |
| 128 | env->SetFloatField(_point, field_x, point.x); |
| 129 | env->SetFloatField(_point, field_y, point.y); |
| 130 | } |
| 131 | |
| 132 | void setJavaPointArray(JNIEnv *env, jobjectArray _array, const std::vector<cv::Point2f>& points) |
| 133 | { |
no outgoing calls
no test coverage detected