| 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 "core/src/fpdfapi/fpdf_page/pageint.h" | 7 #include "core/src/fpdfapi/fpdf_page/pageint.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 for (int i = 0; i < m_nChars; ++i) { | 244 for (int i = 0; i < m_nChars; ++i) { |
| 245 FX_DWORD charcode = | 245 FX_DWORD charcode = |
| 246 m_nChars == 1 ? (FX_DWORD)(uintptr_t)m_pCharCodes : m_pCharCodes[i]; | 246 m_nChars == 1 ? (FX_DWORD)(uintptr_t)m_pCharCodes : m_pCharCodes[i]; |
| 247 if (i > 0) { | 247 if (i > 0) { |
| 248 if (charcode == (FX_DWORD)-1) { | 248 if (charcode == (FX_DWORD)-1) { |
| 249 curpos -= (m_pCharPos[i - 1] * fontsize) / 1000; | 249 curpos -= (m_pCharPos[i - 1] * fontsize) / 1000; |
| 250 continue; | 250 continue; |
| 251 } | 251 } |
| 252 m_pCharPos[i - 1] = curpos; | 252 m_pCharPos[i - 1] = curpos; |
| 253 } | 253 } |
| 254 FX_RECT char_rect; | 254 FX_RECT char_rect = pFont->GetCharBBox(charcode, level); |
| 255 pFont->GetCharBBox(charcode, char_rect, level); | |
| 256 FX_FLOAT charwidth; | 255 FX_FLOAT charwidth; |
| 257 if (!bVertWriting) { | 256 if (!bVertWriting) { |
| 258 if (min_y > char_rect.top) { | 257 if (min_y > char_rect.top) { |
| 259 min_y = (FX_FLOAT)char_rect.top; | 258 min_y = (FX_FLOAT)char_rect.top; |
| 260 } | 259 } |
| 261 if (max_y < char_rect.top) { | 260 if (max_y < char_rect.top) { |
| 262 max_y = (FX_FLOAT)char_rect.top; | 261 max_y = (FX_FLOAT)char_rect.top; |
| 263 } | 262 } |
| 264 if (min_y > char_rect.bottom) { | 263 if (min_y > char_rect.bottom) { |
| 265 min_y = (FX_FLOAT)char_rect.bottom; | 264 min_y = (FX_FLOAT)char_rect.bottom; |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 matrix = m_PageMatrix; | 758 matrix = m_PageMatrix; |
| 760 matrix.Concat(display_matrix); | 759 matrix.Concat(display_matrix); |
| 761 } | 760 } |
| 762 | 761 |
| 763 CPDF_ParseOptions::CPDF_ParseOptions() { | 762 CPDF_ParseOptions::CPDF_ParseOptions() { |
| 764 m_bTextOnly = FALSE; | 763 m_bTextOnly = FALSE; |
| 765 m_bMarkedContent = TRUE; | 764 m_bMarkedContent = TRUE; |
| 766 m_bSeparateForm = TRUE; | 765 m_bSeparateForm = TRUE; |
| 767 m_bDecodeInlineImage = FALSE; | 766 m_bDecodeInlineImage = FALSE; |
| 768 } | 767 } |
| OLD | NEW |