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

Method GetWidth

core/android/CanvasImage.cpp:45–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45float 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
56float CanvasImage::GetHeight() {
57 if (this->image_ != nullptr) {

Callers 2

ResetMethod · 0.45
ResetMethod · 0.45

Calls 1

GetJniEnvSafeFunction · 0.85

Tested by

no test coverage detected