From 5237b425bf8a4af9a1d793dd27202d78e255bfa7 Mon Sep 17 00:00:00 2001 From: Neucrack Date: Thu, 30 May 2024 11:31:17 +0800 Subject: [PATCH] fix draw_string wrap bug --- components/vision/src/maix_image.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/vision/src/maix_image.cpp b/components/vision/src/maix_image.cpp index 42a54517..bd4efd43 100644 --- a/components/vision/src/maix_image.cpp +++ b/components/vision/src/maix_image.cpp @@ -940,8 +940,8 @@ namespace maix::image while (idx < text.length()) { text_tmp += text[idx]; - cv::Size size; - _get_text_size(size, text_tmp, *final_font, final_font_id, scale, thickness); + cv::Size size_tmp; + _get_text_size(size_tmp, text_tmp, *final_font, final_font_id, scale, thickness); if (size_tmp.width >= text_max_width) { if (size_tmp.width > text_max_width)