diff options
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/fpdfeditpage.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp index 78790f7ce6..0b20a006a7 100644 --- a/fpdfsdk/fpdfeditpage.cpp +++ b/fpdfsdk/fpdfeditpage.cpp @@ -289,22 +289,22 @@ DLLEXPORT void STDCALL FPDFPage_TransformAnnots(FPDF_PAGE page, CPDF_AnnotList AnnotList(pPage); for (size_t i = 0; i < AnnotList.Count(); ++i) { CPDF_Annot* pAnnot = AnnotList.GetAt(i); - // transformAnnots Rectangle - CFX_FloatRect rect = pAnnot->GetRect(); + CFX_FloatRect rect = pAnnot->GetRect(); // transformAnnots Rectangle CFX_Matrix matrix((FX_FLOAT)a, (FX_FLOAT)b, (FX_FLOAT)c, (FX_FLOAT)d, (FX_FLOAT)e, (FX_FLOAT)f); rect.Transform(&matrix); + CPDF_Array* pRectArray = pAnnot->GetAnnotDict()->GetArrayFor("Rect"); - if (!pRectArray) + if (!pRectArray) { pRectArray = new CPDF_Array; + pAnnot->GetAnnotDict()->SetFor("Rect", pRectArray); + } pRectArray->SetAt(0, new CPDF_Number(rect.left)); pRectArray->SetAt(1, new CPDF_Number(rect.bottom)); pRectArray->SetAt(2, new CPDF_Number(rect.right)); pRectArray->SetAt(3, new CPDF_Number(rect.top)); - pAnnot->GetAnnotDict()->SetFor("Rect", pRectArray); - // Transform AP's rectangle - // To Do + // TODO: Transform AP's rectangle } } |