diff options
author | kasper93 <kasper93@gmail.com> | 2014-07-07 06:46:21 +0400 |
---|---|---|
committer | kasper93 <kasper93@gmail.com> | 2014-07-08 08:10:29 +0400 |
commit | 65c248888733b3cc7a2183adf3828a096b28167a (patch) | |
tree | adb4d65aadefedfd97e9be77cf2e32674800d8c9 /src/Subtitles | |
parent | 4843ce3cd9aa6a995eb1cd7c1ca529cf64981a49 (diff) |
RTS: Don't initialize useless CRect object.
Diffstat (limited to 'src/Subtitles')
-rw-r--r-- | src/Subtitles/RTS.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Subtitles/RTS.cpp b/src/Subtitles/RTS.cpp index 15ca92058..efc6d2b3f 100644 --- a/src/Subtitles/RTS.cpp +++ b/src/Subtitles/RTS.cpp @@ -2166,16 +2166,16 @@ bool CRenderedTextSubtitle::CreateSubFromSSATag(CSubtitle* sub, const SSATagsLis (sub->m_relativeTo == 1) ? CPoint(m_vidrect.left, m_vidrect.top) : CPoint(0, 0),
m_outlineCache, m_overlayCache);
} else if (nParamsInt == 4) {
- CRect r;
-
sub->m_clipInverse = invert;
- r.SetRect(tag.paramsInt[0], tag.paramsInt[1], tag.paramsInt[2], tag.paramsInt[3]);
+ double dLeft = sub->m_scalex * tag.paramsInt[0];
+ double dTop = sub->m_scaley * tag.paramsInt[1];
+ double dRight = sub->m_scalex * tag.paramsInt[2];
+ double dBottom = sub->m_scaley * tag.paramsInt[3];
- double dLeft = sub->m_scalex * static_cast<double>(r.left), dTop = sub->m_scaley * static_cast<double>(r.top), dRight = sub->m_scalex * static_cast<double>(r.right), dBottom = sub->m_scaley * static_cast<double>(r.bottom);
if (sub->m_relativeTo == 1) {
- double dOffsetX = static_cast<double>(m_vidrect.left) * 0.125;
- double dOffsetY = static_cast<double>(m_vidrect.top) * 0.125;
+ double dOffsetX = m_vidrect.left / 8.0;
+ double dOffsetY = m_vidrect.top / 8.0;
dLeft += dOffsetX;
dTop += dOffsetY;
dRight += dOffsetX;
|