check baseline null in cv::getTextSize() (#146)

This commit is contained in:
nihui
2024-09-07 21:26:26 +08:00
committed by GitHub
parent 55be7538c8
commit 8bbadaaf6f
3 changed files with 3 additions and 3 deletions

View File

@@ -133,7 +133,7 @@ diff -Nuarp opencv-2.4.13.7.orig/modules/core/src/drawing.cpp opencv-2.4.13.7/mo
+ int h;
+ get_text_drawing_size(text.c_str(), fontpixelsize, &w, &h);
+
+ *_base_line = 0;
+ if(_base_line) *_base_line = 0;
+
+ return Size(w, h);
+#if 0

View File

@@ -135,7 +135,7 @@ diff -Nuarp opencv-3.4.20.orig/modules/imgproc/src/drawing.cpp opencv-3.4.20/mod
+ int h;
+ get_text_drawing_size(text.c_str(), fontpixelsize, &w, &h);
+
+ *_base_line = 0;
+ if(_base_line) *_base_line = 0;
+
+ return Size(w, h);
+#if 0

View File

@@ -135,7 +135,7 @@ diff -Nuarp opencv-4.10.0.orig/modules/imgproc/src/drawing.cpp opencv-4.10.0/mod
+ int h;
+ get_text_drawing_size(text.c_str(), fontpixelsize, &w, &h);
+
+ *_base_line = 0;
+ if(_base_line) *_base_line = 0;
+
+ return Size(w, h);
+#if 0