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 #include "../../public/fpdf_formfill.h" |
8 #include "../include/fsdk_define.h" | 9 #include "../include/fsdk_define.h" |
9 | 10 |
10 #if _FX_OS_ == _FX_ANDROID_ | 11 #if _FX_OS_ == _FX_ANDROID_ |
11 #include "time.h" | 12 #include "time.h" |
12 #else | 13 #else |
13 #include <ctime> | 14 #include <ctime> |
14 #endif | 15 #endif |
15 | 16 |
16 DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_CreateNewDocument() { | 17 DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_CreateNewDocument() { |
17 CPDF_Document* pDoc = new CPDF_Document; | 18 CPDF_Document* pDoc = new CPDF_Document; |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 DLLEXPORT void STDCALL FPDFPageObj_Transform(FPDF_PAGEOBJECT page_object, | 268 DLLEXPORT void STDCALL FPDFPageObj_Transform(FPDF_PAGEOBJECT page_object, |
268 double a, | 269 double a, |
269 double b, | 270 double b, |
270 double c, | 271 double c, |
271 double d, | 272 double d, |
272 double e, | 273 double e, |
273 double f) { | 274 double f) { |
274 CPDF_PageObject* pPageObj = (CPDF_PageObject*)page_object; | 275 CPDF_PageObject* pPageObj = (CPDF_PageObject*)page_object; |
275 if (pPageObj == NULL) | 276 if (pPageObj == NULL) |
276 return; | 277 return; |
| 278 |
277 CFX_AffineMatrix matrix((FX_FLOAT)a, (FX_FLOAT)b, (FX_FLOAT)c, (FX_FLOAT)d, | 279 CFX_AffineMatrix matrix((FX_FLOAT)a, (FX_FLOAT)b, (FX_FLOAT)c, (FX_FLOAT)d, |
278 (FX_FLOAT)e, (FX_FLOAT)f); | 280 (FX_FLOAT)e, (FX_FLOAT)f); |
279 pPageObj->Transform(matrix); | 281 pPageObj->Transform(matrix); |
280 } | 282 } |
281 DLLEXPORT void STDCALL FPDFPage_TransformAnnots(FPDF_PAGE page, | 283 DLLEXPORT void STDCALL FPDFPage_TransformAnnots(FPDF_PAGE page, |
282 double a, | 284 double a, |
283 double b, | 285 double b, |
284 double c, | 286 double c, |
285 double d, | 287 double d, |
286 double e, | 288 double e, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 !pPage->m_pFormDict->GetElement("Type")->GetDirect() || | 320 !pPage->m_pFormDict->GetElement("Type")->GetDirect() || |
319 pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( | 321 pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( |
320 "Page")) { | 322 "Page")) { |
321 return; | 323 return; |
322 } | 324 } |
323 CPDF_Dictionary* pDict = pPage->m_pFormDict; | 325 CPDF_Dictionary* pDict = pPage->m_pFormDict; |
324 rotate %= 4; | 326 rotate %= 4; |
325 | 327 |
326 pDict->SetAt("Rotate", new CPDF_Number(rotate * 90)); | 328 pDict->SetAt("Rotate", new CPDF_Number(rotate * 90)); |
327 } | 329 } |
OLD | NEW |