| 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/fpdfdoc/include/cpdf_defaultappearance.h" | 7 #include "core/fpdfdoc/cpdf_defaultappearance.h" |
| 8 | 8 |
| 9 #include "core/fpdfapi/fpdf_parser/cpdf_simple_parser.h" | 9 #include "core/fpdfapi/fpdf_parser/cpdf_simple_parser.h" |
| 10 #include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h" | 10 #include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h" |
| 11 #include "core/fpdfdoc/include/cpdf_formcontrol.h" | 11 #include "core/fpdfdoc/cpdf_formcontrol.h" |
| 12 | 12 |
| 13 FX_BOOL CPDF_DefaultAppearance::HasFont() { | 13 FX_BOOL CPDF_DefaultAppearance::HasFont() { |
| 14 if (m_csDA.IsEmpty()) | 14 if (m_csDA.IsEmpty()) |
| 15 return FALSE; | 15 return FALSE; |
| 16 | 16 |
| 17 CPDF_SimpleParser syntax(m_csDA.AsStringC()); | 17 CPDF_SimpleParser syntax(m_csDA.AsStringC()); |
| 18 return syntax.FindTagParamFromStart("Tf", 2); | 18 return syntax.FindTagParamFromStart("Tf", 2); |
| 19 } | 19 } |
| 20 | 20 |
| 21 CFX_ByteString CPDF_DefaultAppearance::GetFontString() { | 21 CFX_ByteString CPDF_DefaultAppearance::GetFontString() { |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 | 213 |
| 214 CPDF_SimpleParser syntax(m_csDA.AsStringC()); | 214 CPDF_SimpleParser syntax(m_csDA.AsStringC()); |
| 215 if (syntax.FindTagParamFromStart("Tm", 6)) { | 215 if (syntax.FindTagParamFromStart("Tm", 6)) { |
| 216 FX_FLOAT f[6]; | 216 FX_FLOAT f[6]; |
| 217 for (int i = 0; i < 6; i++) | 217 for (int i = 0; i < 6; i++) |
| 218 f[i] = FX_atof(syntax.GetWord()); | 218 f[i] = FX_atof(syntax.GetWord()); |
| 219 tm.Set(f[0], f[1], f[2], f[3], f[4], f[5]); | 219 tm.Set(f[0], f[1], f[2], f[3], f[4], f[5]); |
| 220 } | 220 } |
| 221 return tm; | 221 return tm; |
| 222 } | 222 } |
| OLD | NEW |