|
|
|
@ -1607,10 +1607,12 @@ void DrawOutlineText(cv::Ptr<cv::ft::FreeType2> ft2, cv::Mat& mat, const std::st
|
|
|
|
|
|
|
|
|
|
for (std::vector<std::string>::const_iterator it = lines.cbegin(); it != lines.cend(); ++it )
|
|
|
|
|
{
|
|
|
|
|
textSize = ft2->getTextSize(*it, fontSize, thickness, &baseline);
|
|
|
|
|
std::string trimmedLine = *it;
|
|
|
|
|
trimString(trimmedLine);
|
|
|
|
|
textSize = ft2->getTextSize(trimmedLine, fontSize, thickness, &baseline);
|
|
|
|
|
lineHeight = std::max(fontSize, textSize.height + baseline);
|
|
|
|
|
|
|
|
|
|
ft2->putText(mat, *it, pt, fontSize, clr, thickness, cv::LINE_AA, false, true);
|
|
|
|
|
ft2->putText(mat, trimmedLine, pt, fontSize, clr, thickness, cv::LINE_AA, false, true);
|
|
|
|
|
|
|
|
|
|
pt.x = startPoint.x;
|
|
|
|
|
pt.y += lineHeight + (lineHeight >> 2); // 125%
|
|
|
|
|