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 "x:/pdf/fpdfapi5/include/fpdfapi.h" | 7 // #include "x:/pdf/fpdfapi5/include/fpdfapi.h" |
8 #include "../include/fsdk_define.h" | 8 #include "../include/fsdk_define.h" |
9 #include "../include/fpdfedit.h" | 9 #include "../include/fpdfedit.h" |
10 | 10 |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 pRectArray->SetAt(2,FX_NEW CPDF_Number(rect.right)); | 307 pRectArray->SetAt(2,FX_NEW CPDF_Number(rect.right)); |
308 pRectArray->SetAt(3,FX_NEW CPDF_Number(rect.top)); | 308 pRectArray->SetAt(3,FX_NEW CPDF_Number(rect.top)); |
309 pAnnot->m_pAnnotDict->SetAt("Rect",pRectArray); | 309 pAnnot->m_pAnnotDict->SetAt("Rect",pRectArray); |
310 | 310 |
311 //Transform AP's rectangle | 311 //Transform AP's rectangle |
312 //To Do | 312 //To Do |
313 | 313 |
314 } | 314 } |
315 | 315 |
316 } | 316 } |
| 317 |
| 318 DLLEXPORT void STDCALL FPDFPage_SetRotation(FPDF_PAGE page, int rotate) |
| 319 { |
| 320 CPDF_Page* pPage = (CPDF_Page*)page; |
| 321 if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type
") |
| 322 || pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetStrin
g().Compare("Page")) |
| 323 { |
| 324 return; |
| 325 } |
| 326 CPDF_Dictionary* pDict = pPage->m_pFormDict; |
| 327 rotate %=4; |
| 328 |
| 329 pDict->SetAt("Rotate", FX_NEW CPDF_Number(rotate * 90)); |
| 330 } |
OLD | NEW |