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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 } | 235 } |
236 | 236 |
237 DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GenerateContent(FPDF_PAGE page) { | 237 DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GenerateContent(FPDF_PAGE page) { |
238 CPDF_Page* pPage = CPDFPageFromFPDFPage(page); | 238 CPDF_Page* pPage = CPDFPageFromFPDFPage(page); |
239 if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type") || | 239 if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type") || |
240 !pPage->m_pFormDict->GetElement("Type")->GetDirect() || | 240 !pPage->m_pFormDict->GetElement("Type")->GetDirect() || |
241 pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( | 241 pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( |
242 "Page")) { | 242 "Page")) { |
243 return FALSE; | 243 return FALSE; |
244 } | 244 } |
245 CPDF_PageContentGenerate CG(pPage); | 245 CPDF_PageContentGenerator CG(pPage); |
246 CG.GenerateContent(); | 246 CG.GenerateContent(); |
247 | 247 |
248 return TRUE; | 248 return TRUE; |
249 } | 249 } |
250 | 250 |
251 DLLEXPORT void STDCALL FPDFPageObj_Transform(FPDF_PAGEOBJECT page_object, | 251 DLLEXPORT void STDCALL FPDFPageObj_Transform(FPDF_PAGEOBJECT page_object, |
252 double a, | 252 double a, |
253 double b, | 253 double b, |
254 double c, | 254 double c, |
255 double d, | 255 double d, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 !pPage->m_pFormDict->GetElement("Type")->GetDirect() || | 303 !pPage->m_pFormDict->GetElement("Type")->GetDirect() || |
304 pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( | 304 pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( |
305 "Page")) { | 305 "Page")) { |
306 return; | 306 return; |
307 } | 307 } |
308 CPDF_Dictionary* pDict = pPage->m_pFormDict; | 308 CPDF_Dictionary* pDict = pPage->m_pFormDict; |
309 rotate %= 4; | 309 rotate %= 4; |
310 | 310 |
311 pDict->SetAt("Rotate", new CPDF_Number(rotate * 90)); | 311 pDict->SetAt("Rotate", new CPDF_Number(rotate * 90)); |
312 } | 312 } |
OLD | NEW |