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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 case FXBSTR_ID('R', 'I', 0, 0): | 97 case FXBSTR_ID('R', 'I', 0, 0): |
98 m_GeneralState.SetRenderIntent(pObject->GetString()); | 98 m_GeneralState.SetRenderIntent(pObject->GetString()); |
99 break; | 99 break; |
100 case FXBSTR_ID('F', 'o', 'n', 't'): { | 100 case FXBSTR_ID('F', 'o', 'n', 't'): { |
101 CPDF_Array* pFont = pObject->AsArray(); | 101 CPDF_Array* pFont = pObject->AsArray(); |
102 if (!pFont) | 102 if (!pFont) |
103 break; | 103 break; |
104 | 104 |
105 m_TextState.MakePrivateCopy(); | 105 m_TextState.MakePrivateCopy(); |
106 m_TextState->m_FontSize = pFont->GetNumberAt(1); | 106 m_TextState->m_FontSize = pFont->GetNumberAt(1); |
107 m_TextState->SetFont(pParser->FindFont(pFont->GetStringAt(0))); | 107 m_TextState.SetFont(pParser->FindFont(pFont->GetStringAt(0))); |
108 break; | 108 break; |
109 } | 109 } |
110 case FXBSTR_ID('T', 'R', 0, 0): | 110 case FXBSTR_ID('T', 'R', 0, 0): |
111 if (pGS->KeyExist("TR2")) { | 111 if (pGS->KeyExist("TR2")) { |
112 continue; | 112 continue; |
113 } | 113 } |
114 case FXBSTR_ID('T', 'R', '2', 0): | 114 case FXBSTR_ID('T', 'R', '2', 0): |
115 m_GeneralState->m_pTR = | 115 m_GeneralState->m_pTR = |
116 (pObject && !pObject->IsName()) ? pObject : nullptr; | 116 (pObject && !pObject->IsName()) ? pObject : nullptr; |
117 break; | 117 break; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 case FXBSTR_ID('A', 'I', 'S', 0): | 182 case FXBSTR_ID('A', 'I', 'S', 0): |
183 m_GeneralState->m_AlphaSource = pObject->GetInteger(); | 183 m_GeneralState->m_AlphaSource = pObject->GetInteger(); |
184 break; | 184 break; |
185 case FXBSTR_ID('T', 'K', 0, 0): | 185 case FXBSTR_ID('T', 'K', 0, 0): |
186 m_GeneralState->m_TextKnockout = pObject->GetInteger(); | 186 m_GeneralState->m_TextKnockout = pObject->GetInteger(); |
187 break; | 187 break; |
188 } | 188 } |
189 } | 189 } |
190 m_GeneralState->m_Matrix = m_CTM; | 190 m_GeneralState->m_Matrix = m_CTM; |
191 } | 191 } |
OLD | NEW |