daily pastebin goal
20%
SHARE
TWEET

Untitled

a guest Mar 21st, 2013 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. From 219f9c18e1e5ed2e6d0bd6ba40746d21b67474e6 Mon Sep 17 00:00:00 2001
  2. From: Andres <andres@Andress-Mac-mini.local>
  3. Date: Thu, 21 Mar 2013 17:28:53 -0300
  4. Subject: [PATCH 1/1] depth for Subtitles
  5.  
  6. ---
  7. xbmc/guilib/GraphicContext.cpp             | 6 ++++++
  8.  xbmc/guilib/GraphicContext.h               | 1 +
  9.  xbmc/video/windows/GUIWindowFullScreen.cpp | 3 ++-
  10.  3 files changed, 9 insertions(+), 1 deletion(-)
  11.  mode change 100644 => 100755 xbmc/guilib/GraphicContext.cpp
  12.  mode change 100644 => 100755 xbmc/guilib/GraphicContext.h
  13.  mode change 100644 => 100755 xbmc/video/windows/GUIWindowFullScreen.cpp
  14.  mode change 100644 => 100755 xbmc/video/windows/GUIWindowFullScreen.h
  15.  
  16. diff --git a/xbmc/guilib/GraphicContext.cpp b/xbmc/guilib/GraphicContext.cpp
  17. old mode 100644
  18. new mode 100755
  19. index da323ec..52457f6
  20. --- a/xbmc/guilib/GraphicContext.cpp
  21. +++ b/xbmc/guilib/GraphicContext.cpp
  22. @@ -696,6 +696,12 @@ void CGraphicContext::SetScalingResolution(const RESOLUTION_INFO &res, bool need
  23.    Unlock();
  24.  }
  25.  
  26. +void CGraphicContext::TranslateGUITransform(float x, float y, float z)
  27. +{
  28. +  m_guiTransform *= TransformMatrix::CreateTranslation(x, y, z);
  29. +  UpdateFinalTransform(m_guiTransform);
  30. +}
  31. +
  32.  void CGraphicContext::SetRenderingResolution(const RESOLUTION_INFO &res, bool needsScaling)
  33.  {
  34.    Lock();
  35. diff --git a/xbmc/guilib/GraphicContext.h b/xbmc/guilib/GraphicContext.h
  36. old mode 100644
  37. new mode 100755
  38. index 79450cf..034bd67
  39. --- a/xbmc/guilib/GraphicContext.h
  40. +++ b/xbmc/guilib/GraphicContext.h
  41. @@ -112,6 +112,7 @@ public:
  42.    const RESOLUTION_INFO &GetResInfo() const;
  43.    void SetRenderingResolution(const RESOLUTION_INFO &res, bool needsScaling);  ///< Sets scaling up for rendering
  44.    void SetScalingResolution(const RESOLUTION_INFO &res, bool needsScaling);    ///< Sets scaling up for skin loading etc.
  45. +  void TranslateGUITransform(float x, float y, float z);
  46.    float GetScalingPixelRatio() const;
  47.    void Flip(const CDirtyRegionList& dirty);
  48.    void InvertFinalCoords(float &x, float &y) const;
  49. diff --git a/xbmc/video/windows/GUIWindowFullScreen.cpp b/xbmc/video/windows/GUIWindowFullScreen.cpp
  50. old mode 100644
  51. new mode 100755
  52. index 7b80926..e0d81d3
  53. --- a/xbmc/video/windows/GUIWindowFullScreen.cpp
  54. +++ b/xbmc/video/windows/GUIWindowFullScreen.cpp
  55. @@ -1104,6 +1104,7 @@ void CGUIWindowFullScreen::RenderTTFSubtitles()
  56.  
  57.        RESOLUTION res = g_graphicsContext.GetVideoResolution();
  58.        g_graphicsContext.SetRenderingResolution(g_graphicsContext.GetResInfo(), false);
  59. +      g_graphicsContext.TranslateGUITransform(0, 0, -20);
  60.  
  61.        float maxWidth = (float) g_settings.m_ResInfo[res].Overscan.right - g_settings.m_ResInfo[res].Overscan.left;
  62.        m_subsLayout->Update(subtitleText, maxWidth * 0.9f, false, true); // true to force LTR reading order (most Hebrew subs are this format)
  63. @@ -1135,7 +1136,7 @@ void CGUIWindowFullScreen::RenderTTFSubtitles()
  64.          y = std::max(y, (float) g_settings.m_ResInfo[res].Overscan.top);
  65.          y = std::min(y, g_settings.m_ResInfo[res].Overscan.bottom - textHeight);
  66.        }
  67. -
  68. +        
  69.        m_subsLayout->RenderOutline(x, y, 0, 0xFF000000, XBFONT_CENTER_X, maxWidth);
  70.  
  71.        // reset rendering resolution
  72. diff --git a/xbmc/video/windows/GUIWindowFullScreen.h b/xbmc/video/windows/GUIWindowFullScreen.h
  73. old mode 100644
  74. new mode 100755
  75. --
  76. 1.7.12.4 (Apple Git-37)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top