OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "../../../include/fxge/fx_ge.h" | 7 #include "../../../include/fxge/fx_ge.h" |
8 #include "text_int.h" | 8 #include "text_int.h" |
9 static CFX_GEModule* g_pGEModule = NULL; | 9 static CFX_GEModule* g_pGEModule = NULL; |
10 CFX_GEModule::CFX_GEModule() | 10 CFX_GEModule::CFX_GEModule() |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 } | 58 } |
59 void CFX_GEModule::SetTextGamma(FX_FLOAT gammaValue) | 59 void CFX_GEModule::SetTextGamma(FX_FLOAT gammaValue) |
60 { | 60 { |
61 gammaValue /= 2.2f; | 61 gammaValue /= 2.2f; |
62 int i = 0; | 62 int i = 0; |
63 while (i < 256) { | 63 while (i < 256) { |
64 m_GammaValue[i] = (uint8_t)(FXSYS_pow((FX_FLOAT)i / 255, gammaValue) * 2
55.0f + 0.5f); | 64 m_GammaValue[i] = (uint8_t)(FXSYS_pow((FX_FLOAT)i / 255, gammaValue) * 2
55.0f + 0.5f); |
65 i++; | 65 i++; |
66 } | 66 } |
67 } | 67 } |
68 FX_LPCBYTE CFX_GEModule::GetTextGammaTable() | 68 const uint8_t* CFX_GEModule::GetTextGammaTable() |
69 { | 69 { |
70 return m_GammaValue; | 70 return m_GammaValue; |
71 } | 71 } |
72 void CFX_GEModule::SetExtFontMapper(IFX_FontMapper* pFontMapper) | 72 void CFX_GEModule::SetExtFontMapper(IFX_FontMapper* pFontMapper) |
73 { | 73 { |
74 GetFontMgr()->m_pExtMapper = pFontMapper; | 74 GetFontMgr()->m_pExtMapper = pFontMapper; |
75 pFontMapper->m_pFontMgr = m_pFontMgr; | 75 pFontMapper->m_pFontMgr = m_pFontMgr; |
76 } | 76 } |
OLD | NEW |