| 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/fpdf_edit.h" |
| 7 #include "../include/fsdk_define.h" | 8 #include "../include/fsdk_define.h" |
| 8 #include "../include/fpdfedit.h" | |
| 9 #include "../include/fpdfxfa/fpdfxfa_doc.h" | 9 #include "../include/fpdfxfa/fpdfxfa_doc.h" |
| 10 #include "../include/fpdfxfa/fpdfxfa_page.h" | 10 #include "../include/fpdfxfa/fpdfxfa_page.h" |
| 11 | 11 |
| 12 | |
| 13 DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_NewImgeObj(FPDF_DOCUMENT document) | 12 DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_NewImgeObj(FPDF_DOCUMENT document) |
| 14 { | 13 { |
| 15 if (!document) | 14 if (!document) |
| 16 return NULL; | 15 return NULL; |
| 17 CPDF_ImageObject* pImageObj = FX_NEW CPDF_ImageObject; | 16 CPDF_ImageObject* pImageObj = FX_NEW CPDF_ImageObject; |
| 18 CPDF_Image* pImg = FX_NEW CPDF_Image(((CPDFXFA_Document *)document)->Get
PDFDoc()); | 17 CPDF_Image* pImg = FX_NEW CPDF_Image(((CPDFXFA_Document *)document)->Get
PDFDoc()); |
| 19 pImageObj->m_pImage = pImg; | 18 pImageObj->m_pImage = pImg; |
| 20 return pImageObj; | 19 return pImageObj; |
| 21 } | 20 } |
| 22 | 21 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 { | 69 { |
| 71 CPDF_Page* pPage = ((CPDFXFA_Page*)pages[index])->GetPDFPage(); | 70 CPDF_Page* pPage = ((CPDFXFA_Page*)pages[index])->GetPDFPage(); |
| 72 if (!pPage) continue; | 71 if (!pPage) continue; |
| 73 pImgObj->m_pImage->ResetCache(pPage,NULL); | 72 pImgObj->m_pImage->ResetCache(pPage,NULL); |
| 74 } | 73 } |
| 75 pImgObj->m_pImage->SetImage(pBmp,FALSE); | 74 pImgObj->m_pImage->SetImage(pBmp,FALSE); |
| 76 pImgObj->CalcBoundingBox(); | 75 pImgObj->CalcBoundingBox(); |
| 77 return TRUE; | 76 return TRUE; |
| 78 } | 77 } |
| 79 | 78 |
| OLD | NEW |