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/fpdfxfa/fpdfxfa_doc.h" | 8 #include "../include/fpdfxfa/fpdfxfa_doc.h" |
9 #include "../include/fpdfxfa/fpdfxfa_page.h" | 9 #include "../include/fpdfxfa/fpdfxfa_page.h" |
10 #include "../include/fpdfxfa/fpdfxfa_util.h" | 10 #include "../include/fpdfxfa/fpdfxfa_util.h" |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); | 671 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); |
672 CPDFXFA_Page* pPage = GetPDFXFAPage(); | 672 CPDFXFA_Page* pPage = GetPDFXFAPage(); |
673 | 673 |
674 if (pPage == NULL) return; | 674 if (pPage == NULL) return; |
675 | 675 |
676 if (pPage->GetDocument()->GetDocType() == DOCTYPE_DYNIMIC_XFA) { | 676 if (pPage->GetDocument()->GetDocType() == DOCTYPE_DYNIMIC_XFA) { |
677 CFX_Graphics gs; | 677 CFX_Graphics gs; |
678 gs.Create(pDevice); | 678 gs.Create(pDevice); |
679 if (pClip) { | 679 if (pClip) { |
680 CFX_RectF rectClip; | 680 CFX_RectF rectClip; |
681 » » » rectClip.Set(pClip->left, pClip->top, pClip->Width(), pC
lip->Height()); | 681 » » » rectClip.Set(static_cast<FX_FLOAT>(pClip->left), |
| 682 » » » » static_cast<FX_FLOAT>(pClip->top), |
| 683 » » » » static_cast<FX_FLOAT>(pClip->Width()), |
| 684 » » » » static_cast<FX_FLOAT>(pClip->Height())); |
682 gs.SetClipRect(rectClip); | 685 gs.SetClipRect(rectClip); |
683 } | 686 } |
684 IXFA_RenderContext* pRenderContext = XFA_RenderContext_Create(); | 687 IXFA_RenderContext* pRenderContext = XFA_RenderContext_Create(); |
685 if (!pRenderContext) | 688 if (!pRenderContext) |
686 return; | 689 return; |
687 CXFA_RenderOptions renderOptions; | 690 CXFA_RenderOptions renderOptions; |
688 renderOptions.m_bHighlight = TRUE; | 691 renderOptions.m_bHighlight = TRUE; |
689 pRenderContext->StartRender(pPage->GetXFAPageView(), &gs, *pUser
2Device, renderOptions); | 692 pRenderContext->StartRender(pPage->GetXFAPageView(), &gs, *pUser
2Device, renderOptions); |
690 pRenderContext->DoRender(); | 693 pRenderContext->DoRender(); |
691 pRenderContext->StopRender(); | 694 pRenderContext->StopRender(); |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1246 | 1249 |
1247 for(int i=0; i<m_fxAnnotArray.GetSize(); i++) | 1250 for(int i=0; i<m_fxAnnotArray.GetSize(); i++) |
1248 { | 1251 { |
1249 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); | 1252 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); |
1250 if(pAnnot == pFocusAnnot) | 1253 if(pAnnot == pFocusAnnot) |
1251 return pAnnot; | 1254 return pAnnot; |
1252 } | 1255 } |
1253 return NULL; | 1256 return NULL; |
1254 } | 1257 } |
1255 | 1258 |
OLD | NEW |