| 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 <algorithm> |
| 8 |
| 7 #include "core/include/fxcrt/fx_ext.h" | 9 #include "core/include/fxcrt/fx_ext.h" |
| 8 #include "fpdfsdk/include/fsdk_baseannot.h" | 10 #include "fpdfsdk/include/fsdk_baseannot.h" |
| 9 #include "fpdfsdk/include/fsdk_define.h" | 11 #include "fpdfsdk/include/fsdk_define.h" |
| 10 #include "fpdfsdk/include/fsdk_mgr.h" | 12 #include "fpdfsdk/include/fsdk_mgr.h" |
| 11 | 13 |
| 12 #ifdef PDF_ENABLE_XFA | 14 #ifdef PDF_ENABLE_XFA |
| 13 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h" | 15 #include "fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h" |
| 14 #endif // PDF_ENABLE_XFA | 16 #endif // PDF_ENABLE_XFA |
| 15 | 17 |
| 16 int _gAfxGetTimeZoneInSeconds(FX_CHAR tzhour, uint8_t tzminute) { | 18 int _gAfxGetTimeZoneInSeconds(FX_CHAR tzhour, uint8_t tzminute) { |
| (...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 | 814 |
| 813 color = FXSYS_RGB((int)r, (int)g, (int)b); | 815 color = FXSYS_RGB((int)r, (int)g, (int)b); |
| 814 | 816 |
| 815 return TRUE; | 817 return TRUE; |
| 816 } else if (nCount == 4) { | 818 } else if (nCount == 4) { |
| 817 FX_FLOAT c = pEntry->GetNumber(0); | 819 FX_FLOAT c = pEntry->GetNumber(0); |
| 818 FX_FLOAT m = pEntry->GetNumber(1); | 820 FX_FLOAT m = pEntry->GetNumber(1); |
| 819 FX_FLOAT y = pEntry->GetNumber(2); | 821 FX_FLOAT y = pEntry->GetNumber(2); |
| 820 FX_FLOAT k = pEntry->GetNumber(3); | 822 FX_FLOAT k = pEntry->GetNumber(3); |
| 821 | 823 |
| 822 FX_FLOAT r = 1.0f - FX_MIN(1.0f, c + k); | 824 FX_FLOAT r = 1.0f - std::min(1.0f, c + k); |
| 823 FX_FLOAT g = 1.0f - FX_MIN(1.0f, m + k); | 825 FX_FLOAT g = 1.0f - std::min(1.0f, m + k); |
| 824 FX_FLOAT b = 1.0f - FX_MIN(1.0f, y + k); | 826 FX_FLOAT b = 1.0f - std::min(1.0f, y + k); |
| 825 | 827 |
| 826 color = FXSYS_RGB((int)(r * 255), (int)(g * 255), (int)(b * 255)); | 828 color = FXSYS_RGB((int)(r * 255), (int)(g * 255), (int)(b * 255)); |
| 827 | 829 |
| 828 return TRUE; | 830 return TRUE; |
| 829 } | 831 } |
| 830 } | 832 } |
| 831 | 833 |
| 832 return FALSE; | 834 return FALSE; |
| 833 } | 835 } |
| 834 | 836 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 return NULL; | 983 return NULL; |
| 982 } | 984 } |
| 983 | 985 |
| 984 #ifdef PDF_ENABLE_XFA | 986 #ifdef PDF_ENABLE_XFA |
| 985 CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() { | 987 CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() { |
| 986 if (m_pPageView) | 988 if (m_pPageView) |
| 987 return m_pPageView->GetPDFXFAPage(); | 989 return m_pPageView->GetPDFXFAPage(); |
| 988 return NULL; | 990 return NULL; |
| 989 } | 991 } |
| 990 #endif // PDF_ENABLE_XFA | 992 #endif // PDF_ENABLE_XFA |
| OLD | NEW |