| Index: fpdfsdk/fpdfeditpage.cpp
|
| diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp
|
| index 78790f7ce690da1acb97b042d45ac035192d7883..0b20a006a7b25ba99875537ac5aa047cb45f6e7f 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
|
| }
|
| }
|
|
|
|
|