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 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 | 944 |
945 FX_RECT clip; | 945 FX_RECT clip; |
946 clip.left = start_x; | 946 clip.left = start_x; |
947 clip.right = start_x + size_x; | 947 clip.right = start_x + size_x; |
948 clip.top = start_y; | 948 clip.top = start_y; |
949 clip.bottom = start_y + size_y; | 949 clip.bottom = start_y + size_y; |
950 pContext->m_pDevice->SaveState(); | 950 pContext->m_pDevice->SaveState(); |
951 pContext->m_pDevice->SetClip_Rect(&clip); | 951 pContext->m_pDevice->SetClip_Rect(&clip); |
952 | 952 |
953 pContext->m_pContext = new CPDF_RenderContext(pPage); | 953 pContext->m_pContext = new CPDF_RenderContext(pPage); |
954 pContext->m_pContext->AppendObjectList(pPage, &matrix); | 954 pContext->m_pContext->AppendLayer(pPage, &matrix); |
955 | 955 |
956 if (flags & FPDF_ANNOT) { | 956 if (flags & FPDF_ANNOT) { |
957 pContext->m_pAnnots = new CPDF_AnnotList(pPage); | 957 pContext->m_pAnnots = new CPDF_AnnotList(pPage); |
958 FX_BOOL bPrinting = pContext->m_pDevice->GetDeviceClass() != FXDC_DISPLAY; | 958 FX_BOOL bPrinting = pContext->m_pDevice->GetDeviceClass() != FXDC_DISPLAY; |
959 pContext->m_pAnnots->DisplayAnnots(pPage, pContext->m_pContext, bPrinting, | 959 pContext->m_pAnnots->DisplayAnnots(pPage, pContext->m_pContext, bPrinting, |
960 &matrix, TRUE, NULL); | 960 &matrix, TRUE, NULL); |
961 } | 961 } |
962 | 962 |
963 pContext->m_pRenderer = new CPDF_ProgressiveRenderer( | 963 pContext->m_pRenderer = new CPDF_ProgressiveRenderer( |
964 pContext->m_pContext, pContext->m_pDevice, pContext->m_pOptions); | 964 pContext->m_pContext, pContext->m_pDevice, pContext->m_pOptions); |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1189 if (!buffer) { | 1189 if (!buffer) { |
1190 *buflen = len; | 1190 *buflen = len; |
1191 } else if (*buflen >= len) { | 1191 } else if (*buflen >= len) { |
1192 memcpy(buffer, utf16Name.c_str(), len); | 1192 memcpy(buffer, utf16Name.c_str(), len); |
1193 *buflen = len; | 1193 *buflen = len; |
1194 } else { | 1194 } else { |
1195 *buflen = -1; | 1195 *buflen = -1; |
1196 } | 1196 } |
1197 return (FPDF_DEST)pDestObj; | 1197 return (FPDF_DEST)pDestObj; |
1198 } | 1198 } |
OLD | NEW |