| 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 "../../public/fpdf_formfill.h" |
| 9 #include "../include/fsdk_define.h" | 9 #include "../include/fsdk_define.h" |
| 10 | 10 |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 double a, | 270 double a, |
| 271 double b, | 271 double b, |
| 272 double c, | 272 double c, |
| 273 double d, | 273 double d, |
| 274 double e, | 274 double e, |
| 275 double f) { | 275 double f) { |
| 276 CPDF_Page* pPage = CPDFPageFromFPDFPage(page); | 276 CPDF_Page* pPage = CPDFPageFromFPDFPage(page); |
| 277 if (!pPage) | 277 if (!pPage) |
| 278 return; | 278 return; |
| 279 CPDF_AnnotList AnnotList(pPage); | 279 CPDF_AnnotList AnnotList(pPage); |
| 280 for (int i = 0; i < AnnotList.Count(); i++) { | 280 for (size_t i = 0; i < AnnotList.Count(); ++i) { |
| 281 CPDF_Annot* pAnnot = AnnotList.GetAt(i); | 281 CPDF_Annot* pAnnot = AnnotList.GetAt(i); |
| 282 // transformAnnots Rectangle | 282 // transformAnnots Rectangle |
| 283 CPDF_Rect rect; | 283 CPDF_Rect rect; |
| 284 pAnnot->GetRect(rect); | 284 pAnnot->GetRect(rect); |
| 285 CFX_AffineMatrix matrix((FX_FLOAT)a, (FX_FLOAT)b, (FX_FLOAT)c, (FX_FLOAT)d, | 285 CFX_AffineMatrix matrix((FX_FLOAT)a, (FX_FLOAT)b, (FX_FLOAT)c, (FX_FLOAT)d, |
| 286 (FX_FLOAT)e, (FX_FLOAT)f); | 286 (FX_FLOAT)e, (FX_FLOAT)f); |
| 287 rect.Transform(&matrix); | 287 rect.Transform(&matrix); |
| 288 CPDF_Array* pRectArray = NULL; | 288 CPDF_Array* pRectArray = NULL; |
| 289 pRectArray = pAnnot->GetAnnotDict()->GetArray("Rect"); | 289 pRectArray = pAnnot->GetAnnotDict()->GetArray("Rect"); |
| 290 if (!pRectArray) | 290 if (!pRectArray) |
| (...skipping 15 matching lines...) Expand all Loading... |
| 306 !pPage->m_pFormDict->GetElement("Type")->GetDirect() || | 306 !pPage->m_pFormDict->GetElement("Type")->GetDirect() || |
| 307 pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( | 307 pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( |
| 308 "Page")) { | 308 "Page")) { |
| 309 return; | 309 return; |
| 310 } | 310 } |
| 311 CPDF_Dictionary* pDict = pPage->m_pFormDict; | 311 CPDF_Dictionary* pDict = pPage->m_pFormDict; |
| 312 rotate %= 4; | 312 rotate %= 4; |
| 313 | 313 |
| 314 pDict->SetAt("Rotate", new CPDF_Number(rotate * 90)); | 314 pDict->SetAt("Rotate", new CPDF_Number(rotate * 90)); |
| 315 } | 315 } |
| OLD | NEW |