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 "public/fpdf_edit.h" |
8 | 8 |
9 #include "fpdfsdk/include/fsdk_define.h" | 9 #include "fpdfsdk/include/fsdk_define.h" |
10 #include "public/fpdf_formfill.h" | 10 #include "public/fpdf_formfill.h" |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 } | 223 } |
224 | 224 |
225 DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GenerateContent(FPDF_PAGE page) { | 225 DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GenerateContent(FPDF_PAGE page) { |
226 CPDF_Page* pPage = CPDFPageFromFPDFPage(page); | 226 CPDF_Page* pPage = CPDFPageFromFPDFPage(page); |
227 if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type") || | 227 if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type") || |
228 !pPage->m_pFormDict->GetElement("Type")->GetDirect() || | 228 !pPage->m_pFormDict->GetElement("Type")->GetDirect() || |
229 pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( | 229 pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( |
230 "Page")) { | 230 "Page")) { |
231 return FALSE; | 231 return FALSE; |
232 } | 232 } |
233 CPDF_PageContentGenerate CG(pPage); | 233 CPDF_PageContentGenerator CG(pPage); |
234 CG.GenerateContent(); | 234 CG.GenerateContent(); |
235 | 235 |
236 return TRUE; | 236 return TRUE; |
237 } | 237 } |
238 | 238 |
239 DLLEXPORT void STDCALL FPDFPageObj_Transform(FPDF_PAGEOBJECT page_object, | 239 DLLEXPORT void STDCALL FPDFPageObj_Transform(FPDF_PAGEOBJECT page_object, |
240 double a, | 240 double a, |
241 double b, | 241 double b, |
242 double c, | 242 double c, |
243 double d, | 243 double d, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 !pPage->m_pFormDict->GetElement("Type")->GetDirect() || | 291 !pPage->m_pFormDict->GetElement("Type")->GetDirect() || |
292 pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( | 292 pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( |
293 "Page")) { | 293 "Page")) { |
294 return; | 294 return; |
295 } | 295 } |
296 CPDF_Dictionary* pDict = pPage->m_pFormDict; | 296 CPDF_Dictionary* pDict = pPage->m_pFormDict; |
297 rotate %= 4; | 297 rotate %= 4; |
298 | 298 |
299 pDict->SetAt("Rotate", new CPDF_Number(rotate * 90)); | 299 pDict->SetAt("Rotate", new CPDF_Number(rotate * 90)); |
300 } | 300 } |
OLD | NEW |