Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 219f9c18e1e5ed2e6d0bd6ba40746d21b67474e6 Mon Sep 17 00:00:00 2001
- From: Andres <andres@Andress-Mac-mini.local>
- Date: Thu, 21 Mar 2013 17:28:53 -0300
- Subject: [PATCH 1/1] depth for Subtitles
- ---
- xbmc/guilib/GraphicContext.cpp | 6 ++++++
- xbmc/guilib/GraphicContext.h | 1 +
- xbmc/video/windows/GUIWindowFullScreen.cpp | 3 ++-
- 3 files changed, 9 insertions(+), 1 deletion(-)
- mode change 100644 => 100755 xbmc/guilib/GraphicContext.cpp
- mode change 100644 => 100755 xbmc/guilib/GraphicContext.h
- mode change 100644 => 100755 xbmc/video/windows/GUIWindowFullScreen.cpp
- mode change 100644 => 100755 xbmc/video/windows/GUIWindowFullScreen.h
- diff --git a/xbmc/guilib/GraphicContext.cpp b/xbmc/guilib/GraphicContext.cpp
- old mode 100644
- new mode 100755
- index da323ec..52457f6
- --- a/xbmc/guilib/GraphicContext.cpp
- +++ b/xbmc/guilib/GraphicContext.cpp
- @@ -696,6 +696,12 @@ void CGraphicContext::SetScalingResolution(const RESOLUTION_INFO &res, bool need
- Unlock();
- }
- +void CGraphicContext::TranslateGUITransform(float x, float y, float z)
- +{
- + m_guiTransform *= TransformMatrix::CreateTranslation(x, y, z);
- + UpdateFinalTransform(m_guiTransform);
- +}
- +
- void CGraphicContext::SetRenderingResolution(const RESOLUTION_INFO &res, bool needsScaling)
- {
- Lock();
- diff --git a/xbmc/guilib/GraphicContext.h b/xbmc/guilib/GraphicContext.h
- old mode 100644
- new mode 100755
- index 79450cf..034bd67
- --- a/xbmc/guilib/GraphicContext.h
- +++ b/xbmc/guilib/GraphicContext.h
- @@ -112,6 +112,7 @@ public:
- const RESOLUTION_INFO &GetResInfo() const;
- void SetRenderingResolution(const RESOLUTION_INFO &res, bool needsScaling); ///< Sets scaling up for rendering
- void SetScalingResolution(const RESOLUTION_INFO &res, bool needsScaling); ///< Sets scaling up for skin loading etc.
- + void TranslateGUITransform(float x, float y, float z);
- float GetScalingPixelRatio() const;
- void Flip(const CDirtyRegionList& dirty);
- void InvertFinalCoords(float &x, float &y) const;
- diff --git a/xbmc/video/windows/GUIWindowFullScreen.cpp b/xbmc/video/windows/GUIWindowFullScreen.cpp
- old mode 100644
- new mode 100755
- index 7b80926..e0d81d3
- --- a/xbmc/video/windows/GUIWindowFullScreen.cpp
- +++ b/xbmc/video/windows/GUIWindowFullScreen.cpp
- @@ -1104,6 +1104,7 @@ void CGUIWindowFullScreen::RenderTTFSubtitles()
- RESOLUTION res = g_graphicsContext.GetVideoResolution();
- g_graphicsContext.SetRenderingResolution(g_graphicsContext.GetResInfo(), false);
- + g_graphicsContext.TranslateGUITransform(0, 0, -20);
- float maxWidth = (float) g_settings.m_ResInfo[res].Overscan.right - g_settings.m_ResInfo[res].Overscan.left;
- m_subsLayout->Update(subtitleText, maxWidth * 0.9f, false, true); // true to force LTR reading order (most Hebrew subs are this format)
- @@ -1135,7 +1136,7 @@ void CGUIWindowFullScreen::RenderTTFSubtitles()
- y = std::max(y, (float) g_settings.m_ResInfo[res].Overscan.top);
- y = std::min(y, g_settings.m_ResInfo[res].Overscan.bottom - textHeight);
- }
- -
- +
- m_subsLayout->RenderOutline(x, y, 0, 0xFF000000, XBFONT_CENTER_X, maxWidth);
- // reset rendering resolution
- diff --git a/xbmc/video/windows/GUIWindowFullScreen.h b/xbmc/video/windows/GUIWindowFullScreen.h
- old mode 100644
- new mode 100755
- --
- 1.7.12.4 (Apple Git-37)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement