| 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 <limits> | 7 #include <limits> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "core/fxcodec/include/fx_codec.h" | 10 #include "core/fxcodec/include/fx_codec.h" |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 } | 464 } |
| 465 } | 465 } |
| 466 CFX_Matrix char2device; | 466 CFX_Matrix char2device; |
| 467 CFX_Matrix text2Device; | 467 CFX_Matrix text2Device; |
| 468 if (pText2Device) { | 468 if (pText2Device) { |
| 469 char2device = *pText2Device; | 469 char2device = *pText2Device; |
| 470 text2Device = *pText2Device; | 470 text2Device = *pText2Device; |
| 471 } | 471 } |
| 472 char2device.Scale(font_size, -font_size); | 472 char2device.Scale(font_size, -font_size); |
| 473 if (FXSYS_fabs(char2device.a) + FXSYS_fabs(char2device.b) > 50 * 1.0f || | 473 if (FXSYS_fabs(char2device.a) + FXSYS_fabs(char2device.b) > 50 * 1.0f || |
| 474 ((m_DeviceClass == FXDC_PRINTER && !m_pDeviceDriver->IsPSPrintDriver()) && | 474 ((m_DeviceClass == FXDC_PRINTER) && |
| 475 !(text_flags & FXTEXT_PRINTIMAGETEXT))) { | 475 !(text_flags & FXTEXT_PRINTIMAGETEXT))) { |
| 476 if (pFont->GetFace() || | 476 if (pFont->GetFace() || |
| 477 (pFont->GetSubstFont()->m_SubstFlags & FXFONT_SUBST_GLYPHPATH)) { | 477 (pFont->GetSubstFont()->m_SubstFlags & FXFONT_SUBST_GLYPHPATH)) { |
| 478 int nPathFlags = | 478 int nPathFlags = |
| 479 (text_flags & FXTEXT_NOSMOOTH) == 0 ? 0 : FXFILL_NOPATHSMOOTH; | 479 (text_flags & FXTEXT_NOSMOOTH) == 0 ? 0 : FXFILL_NOPATHSMOOTH; |
| 480 return DrawTextPathWithFlags(nChars, pCharPos, pFont, pCache, font_size, | 480 return DrawTextPathWithFlags(nChars, pCharPos, pFont, pCache, font_size, |
| 481 pText2Device, nullptr, nullptr, fill_color, | 481 pText2Device, nullptr, nullptr, fill_color, |
| 482 0, nullptr, nPathFlags); | 482 0, nullptr, nPathFlags); |
| 483 } | 483 } |
| 484 } | 484 } |
| (...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1432 void _CFX_UniqueKeyGen::Generate(int count, ...) { | 1432 void _CFX_UniqueKeyGen::Generate(int count, ...) { |
| 1433 va_list argList; | 1433 va_list argList; |
| 1434 va_start(argList, count); | 1434 va_start(argList, count); |
| 1435 for (int i = 0; i < count; i++) { | 1435 for (int i = 0; i < count; i++) { |
| 1436 int p = va_arg(argList, int); | 1436 int p = va_arg(argList, int); |
| 1437 ((uint32_t*)m_Key)[i] = p; | 1437 ((uint32_t*)m_Key)[i] = p; |
| 1438 } | 1438 } |
| 1439 va_end(argList); | 1439 va_end(argList); |
| 1440 m_KeyLen = count * sizeof(uint32_t); | 1440 m_KeyLen = count * sizeof(uint32_t); |
| 1441 } | 1441 } |
| OLD | NEW |