| 43 | } |
| 44 | |
| 45 | float CanvasImage::GetWidth() { |
| 46 | if (this->image_ != nullptr) { |
| 47 | JNIEnv *env_ = GetJniEnvSafe(); |
| 48 | jclass clzz = env_->FindClass("android/graphics/Bitmap"); |
| 49 | jmethodID getWidth_ = env_->GetMethodID(clzz, "getWidth", "()I"); |
| 50 | env_->CallIntMethod((jobject) this->image_, getWidth_); |
| 51 | |
| 52 | } |
| 53 | return 0; |
| 54 | } |
| 55 | |
| 56 | float CanvasImage::GetHeight() { |
| 57 | if (this->image_ != nullptr) { |
no test coverage detected