Fix bug in metafile conversion

This commit is contained in:
Kirill Polyakov
2025-11-13 03:03:25 +03:00
parent 910ff6a6dd
commit 62413b8df5

View File

@ -1740,8 +1740,8 @@ namespace MetaFile
const TRectL& oEmfRect{oEmfParser.GetDCBounds()};
const TRectL& oCurentRect{GetDCBounds()};
const double dScaleX = std::abs((oCurentRect.Right - oCurentRect.Left) / (oEmfRect.Right - oEmfRect.Left));
const double dScaleY = std::abs((oCurentRect.Bottom - oCurentRect.Top) / (oEmfRect.Bottom - oEmfRect.Top));
const double dScaleX = std::abs((double)(oCurentRect.Right - oCurentRect.Left) / (double)(oEmfRect.Right - oEmfRect.Left));
const double dScaleY = std::abs((double)(oCurentRect.Bottom - oCurentRect.Top) / (double)(oEmfRect.Bottom - oEmfRect.Top));
const bool bAddGElement = !Equals(1., dScaleX) || !Equals(1., dScaleY);