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 "public/fpdfview.h" | 7 #include "public/fpdfview.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 | 732 |
733 FX_RECT clip; | 733 FX_RECT clip; |
734 clip.left = start_x; | 734 clip.left = start_x; |
735 clip.right = start_x + size_x; | 735 clip.right = start_x + size_x; |
736 clip.top = start_y; | 736 clip.top = start_y; |
737 clip.bottom = start_y + size_y; | 737 clip.bottom = start_y + size_y; |
738 pContext->m_pDevice->SaveState(); | 738 pContext->m_pDevice->SaveState(); |
739 pContext->m_pDevice->SetClip_Rect(&clip); | 739 pContext->m_pDevice->SetClip_Rect(&clip); |
740 | 740 |
741 pContext->m_pContext = new CPDF_RenderContext(pPage); | 741 pContext->m_pContext = new CPDF_RenderContext(pPage); |
742 pContext->m_pContext->AppendObjectList(pPage, &matrix); | 742 pContext->m_pContext->AppendLayer(pPage, &matrix); |
743 | 743 |
744 if (flags & FPDF_ANNOT) { | 744 if (flags & FPDF_ANNOT) { |
745 pContext->m_pAnnots = new CPDF_AnnotList(pPage); | 745 pContext->m_pAnnots = new CPDF_AnnotList(pPage); |
746 FX_BOOL bPrinting = pContext->m_pDevice->GetDeviceClass() != FXDC_DISPLAY; | 746 FX_BOOL bPrinting = pContext->m_pDevice->GetDeviceClass() != FXDC_DISPLAY; |
747 pContext->m_pAnnots->DisplayAnnots(pPage, pContext->m_pContext, bPrinting, | 747 pContext->m_pAnnots->DisplayAnnots(pPage, pContext->m_pContext, bPrinting, |
748 &matrix, TRUE, NULL); | 748 &matrix, TRUE, NULL); |
749 } | 749 } |
750 | 750 |
751 pContext->m_pRenderer = new CPDF_ProgressiveRenderer( | 751 pContext->m_pRenderer = new CPDF_ProgressiveRenderer( |
752 pContext->m_pContext, pContext->m_pDevice, pContext->m_pOptions); | 752 pContext->m_pContext, pContext->m_pDevice, pContext->m_pOptions); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 if (!buffer) { | 913 if (!buffer) { |
914 *buflen = len; | 914 *buflen = len; |
915 } else if (*buflen >= len) { | 915 } else if (*buflen >= len) { |
916 memcpy(buffer, utf16Name.c_str(), len); | 916 memcpy(buffer, utf16Name.c_str(), len); |
917 *buflen = len; | 917 *buflen = len; |
918 } else { | 918 } else { |
919 *buflen = -1; | 919 *buflen = -1; |
920 } | 920 } |
921 return (FPDF_DEST)pDestObj; | 921 return (FPDF_DEST)pDestObj; |
922 } | 922 } |
OLD | NEW |