Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: fpdfsdk/src/fpdfeditimg.cpp

Issue 1136703003: Merge to XFA: Create top-level public/ header directory. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/src/fpdfdoc_embeddertest.cpp ('k') | fpdfsdk/src/fpdfeditpage.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « fpdfsdk/src/fpdfdoc_embeddertest.cpp ('k') | fpdfsdk/src/fpdfeditpage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698