| 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 "../include/fsdk_define.h" | 7 #include "../include/fsdk_define.h" |
| 8 #include "../include/fsdk_mgr.h" | 8 #include "../include/fsdk_mgr.h" |
| 9 #include "../include/fpdfview.h" | 9 #include "../include/fpdfview.h" |
| 10 #include "../include/fsdk_rendercontext.h" | 10 #include "../include/fsdk_rendercontext.h" |
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 if (flags & FPDF_LCD_TEXT) | 682 if (flags & FPDF_LCD_TEXT) |
| 683 pContext->m_pOptions->m_Flags |= RENDER_CLEARTYPE; | 683 pContext->m_pOptions->m_Flags |= RENDER_CLEARTYPE; |
| 684 else | 684 else |
| 685 pContext->m_pOptions->m_Flags &= ~RENDER_CLEARTYPE; | 685 pContext->m_pOptions->m_Flags &= ~RENDER_CLEARTYPE; |
| 686 if (flags & FPDF_NO_NATIVETEXT) | 686 if (flags & FPDF_NO_NATIVETEXT) |
| 687 pContext->m_pOptions->m_Flags |= RENDER_NO_NATIVETEXT; | 687 pContext->m_pOptions->m_Flags |= RENDER_NO_NATIVETEXT; |
| 688 if (flags & FPDF_RENDER_LIMITEDIMAGECACHE) | 688 if (flags & FPDF_RENDER_LIMITEDIMAGECACHE) |
| 689 pContext->m_pOptions->m_Flags |= RENDER_LIMITEDIMAGECACHE; | 689 pContext->m_pOptions->m_Flags |= RENDER_LIMITEDIMAGECACHE; |
| 690 if (flags & FPDF_RENDER_FORCEHALFTONE) | 690 if (flags & FPDF_RENDER_FORCEHALFTONE) |
| 691 pContext->m_pOptions->m_Flags |= RENDER_FORCE_HALFTONE; | 691 pContext->m_pOptions->m_Flags |= RENDER_FORCE_HALFTONE; |
| 692 if (flags & FPDF_RENDER_NO_SMOOTHTEXT) |
| 693 pContext->m_pOptions->m_Flags |= RENDER_NOTEXTSMOOTH; |
| 694 if (flags & FPDF_RENDER_NO_SMOOTHIMAGE) |
| 695 pContext->m_pOptions->m_Flags |= RENDER_NOIMAGESMOOTH; |
| 696 if (flags & FPDF_RENDER_NO_SMOOTHPATH) |
| 697 pContext->m_pOptions->m_Flags |= RENDER_NOPATHSMOOTH; |
| 692 //Grayscale output | 698 //Grayscale output |
| 693 if (flags & FPDF_GRAYSCALE) | 699 if (flags & FPDF_GRAYSCALE) |
| 694 { | 700 { |
| 695 pContext->m_pOptions->m_ColorMode = RENDER_COLOR_GRAY; | 701 pContext->m_pOptions->m_ColorMode = RENDER_COLOR_GRAY; |
| 696 pContext->m_pOptions->m_ForeColor = 0; | 702 pContext->m_pOptions->m_ForeColor = 0; |
| 697 pContext->m_pOptions->m_BackColor = 0xffffff; | 703 pContext->m_pOptions->m_BackColor = 0xffffff; |
| 698 } | 704 } |
| 699 const CPDF_OCContext::UsageType usage = (flags & FPDF_PRINTING) ? CPDF_O
CContext::Print : CPDF_OCContext::View; | 705 const CPDF_OCContext::UsageType usage = (flags & FPDF_PRINTING) ? CPDF_O
CContext::Print : CPDF_OCContext::View; |
| 700 | 706 |
| 701 pContext->m_pOptions->m_AddFlags = flags >> 8; | 707 pContext->m_pOptions->m_AddFlags = flags >> 8; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 if (!buffer) { | 864 if (!buffer) { |
| 859 buflen = len; | 865 buflen = len; |
| 860 } else if (buflen >= len) { | 866 } else if (buflen >= len) { |
| 861 memcpy(buffer, utf16Name.c_str(), len); | 867 memcpy(buffer, utf16Name.c_str(), len); |
| 862 buflen = len; | 868 buflen = len; |
| 863 } else { | 869 } else { |
| 864 buflen = -1; | 870 buflen = -1; |
| 865 } | 871 } |
| 866 return (FPDF_DEST)pDestObj; | 872 return (FPDF_DEST)pDestObj; |
| 867 } | 873 } |
| OLD | NEW |