OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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 "core/fpdfapi/fpdf_page/cpdf_allstates.h" | 7 #include "core/fpdfapi/fpdf_page/cpdf_allstates.h" |
8 | 8 |
9 #include "core/fpdfapi/fpdf_page/pageint.h" | 9 #include "core/fpdfapi/fpdf_page/pageint.h" |
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 break; | 91 break; |
92 } | 92 } |
93 case FXBSTR_ID('R', 'I', 0, 0): | 93 case FXBSTR_ID('R', 'I', 0, 0): |
94 m_GeneralState.SetRenderIntent(pObject->GetString()); | 94 m_GeneralState.SetRenderIntent(pObject->GetString()); |
95 break; | 95 break; |
96 case FXBSTR_ID('F', 'o', 'n', 't'): { | 96 case FXBSTR_ID('F', 'o', 'n', 't'): { |
97 CPDF_Array* pFont = pObject->AsArray(); | 97 CPDF_Array* pFont = pObject->AsArray(); |
98 if (!pFont) | 98 if (!pFont) |
99 break; | 99 break; |
100 | 100 |
101 m_TextState.GetPrivateCopy()->m_FontSize = pFont->GetNumberAt(1); | 101 m_TextState.SetFontSize(pFont->GetNumberAt(1)); |
102 m_TextState.SetFont(pParser->FindFont(pFont->GetStringAt(0))); | 102 m_TextState.SetFont(pParser->FindFont(pFont->GetStringAt(0))); |
103 break; | 103 break; |
104 } | 104 } |
105 case FXBSTR_ID('T', 'R', 0, 0): | 105 case FXBSTR_ID('T', 'R', 0, 0): |
106 if (pGS->KeyExist("TR2")) { | 106 if (pGS->KeyExist("TR2")) { |
107 continue; | 107 continue; |
108 } | 108 } |
109 case FXBSTR_ID('T', 'R', '2', 0): | 109 case FXBSTR_ID('T', 'R', '2', 0): |
110 pGeneralState->m_pTR = | 110 pGeneralState->m_pTR = |
111 (pObject && !pObject->IsName()) ? pObject : nullptr; | 111 (pObject && !pObject->IsName()) ? pObject : nullptr; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 case FXBSTR_ID('A', 'I', 'S', 0): | 177 case FXBSTR_ID('A', 'I', 'S', 0): |
178 pGeneralState->m_AlphaSource = pObject->GetInteger(); | 178 pGeneralState->m_AlphaSource = pObject->GetInteger(); |
179 break; | 179 break; |
180 case FXBSTR_ID('T', 'K', 0, 0): | 180 case FXBSTR_ID('T', 'K', 0, 0): |
181 pGeneralState->m_TextKnockout = pObject->GetInteger(); | 181 pGeneralState->m_TextKnockout = pObject->GetInteger(); |
182 break; | 182 break; |
183 } | 183 } |
184 } | 184 } |
185 pGeneralState->m_Matrix = m_CTM; | 185 pGeneralState->m_Matrix = m_CTM; |
186 } | 186 } |
OLD | NEW |