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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 CFX_FontCache* pCache, | 441 CFX_FontCache* pCache, |
442 FX_FLOAT font_size, | 442 FX_FLOAT font_size, |
443 const CFX_Matrix* pText2Device, | 443 const CFX_Matrix* pText2Device, |
444 uint32_t fill_color, | 444 uint32_t fill_color, |
445 uint32_t text_flags) { | 445 uint32_t text_flags) { |
446 int nativetext_flags = text_flags; | 446 int nativetext_flags = text_flags; |
447 if (m_DeviceClass != FXDC_DISPLAY) { | 447 if (m_DeviceClass != FXDC_DISPLAY) { |
448 if (!(text_flags & FXTEXT_PRINTGRAPHICTEXT)) { | 448 if (!(text_flags & FXTEXT_PRINTGRAPHICTEXT)) { |
449 if (ShouldDrawDeviceText(pFont, text_flags) && | 449 if (ShouldDrawDeviceText(pFont, text_flags) && |
450 m_pDeviceDriver->DrawDeviceText(nChars, pCharPos, pFont, pCache, | 450 m_pDeviceDriver->DrawDeviceText(nChars, pCharPos, pFont, pCache, |
451 pText2Device, font_size, fill_color, | 451 pText2Device, font_size, |
452 0, nullptr)) { | 452 fill_color)) { |
453 return TRUE; | 453 return TRUE; |
454 } | 454 } |
455 } | 455 } |
456 if (FXARGB_A(fill_color) < 255) | 456 if (FXARGB_A(fill_color) < 255) |
457 return FALSE; | 457 return FALSE; |
458 } else if (!(text_flags & FXTEXT_NO_NATIVETEXT)) { | 458 } else if (!(text_flags & FXTEXT_NO_NATIVETEXT)) { |
459 if (ShouldDrawDeviceText(pFont, text_flags) && | 459 if (ShouldDrawDeviceText(pFont, text_flags) && |
460 m_pDeviceDriver->DrawDeviceText(nChars, pCharPos, pFont, pCache, | 460 m_pDeviceDriver->DrawDeviceText(nChars, pCharPos, pFont, pCache, |
461 pText2Device, font_size, fill_color, 0, | 461 pText2Device, font_size, fill_color)) { |
462 nullptr)) { | |
463 return TRUE; | 462 return TRUE; |
464 } | 463 } |
465 } | 464 } |
466 CFX_Matrix char2device; | 465 CFX_Matrix char2device; |
467 CFX_Matrix text2Device; | 466 CFX_Matrix text2Device; |
468 if (pText2Device) { | 467 if (pText2Device) { |
469 char2device = *pText2Device; | 468 char2device = *pText2Device; |
470 text2Device = *pText2Device; | 469 text2Device = *pText2Device; |
471 } | 470 } |
472 char2device.Scale(font_size, -font_size); | 471 char2device.Scale(font_size, -font_size); |
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1434 void _CFX_UniqueKeyGen::Generate(int count, ...) { | 1433 void _CFX_UniqueKeyGen::Generate(int count, ...) { |
1435 va_list argList; | 1434 va_list argList; |
1436 va_start(argList, count); | 1435 va_start(argList, count); |
1437 for (int i = 0; i < count; i++) { | 1436 for (int i = 0; i < count; i++) { |
1438 int p = va_arg(argList, int); | 1437 int p = va_arg(argList, int); |
1439 ((uint32_t*)m_Key)[i] = p; | 1438 ((uint32_t*)m_Key)[i] = p; |
1440 } | 1439 } |
1441 va_end(argList); | 1440 va_end(argList); |
1442 m_KeyLen = count * sizeof(uint32_t); | 1441 m_KeyLen = count * sizeof(uint32_t); |
1443 } | 1442 } |
OLD | NEW |