| 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 "xfa/fxfa/app/xfa_ffimageedit.h" | 7 #include "xfa/fxfa/app/xfa_ffimageedit.h" |
| 8 | 8 |
| 9 #include "xfa/fwl/core/cfwl_app.h" | 9 #include "xfa/fwl/core/cfwl_app.h" |
| 10 #include "xfa/fwl/core/cfwl_msgmouse.h" | 10 #include "xfa/fwl/core/cfwl_msgmouse.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 GetRotateMatrix(mtRotate); | 55 GetRotateMatrix(mtRotate); |
| 56 if (pMatrix) { | 56 if (pMatrix) { |
| 57 mtRotate.Concat(*pMatrix); | 57 mtRotate.Concat(*pMatrix); |
| 58 } | 58 } |
| 59 CXFA_FFWidget::RenderWidget(pGS, &mtRotate, dwStatus); | 59 CXFA_FFWidget::RenderWidget(pGS, &mtRotate, dwStatus); |
| 60 CXFA_Border borderUI = m_pDataAcc->GetUIBorder(); | 60 CXFA_Border borderUI = m_pDataAcc->GetUIBorder(); |
| 61 DrawBorder(pGS, borderUI, m_rtUI, &mtRotate); | 61 DrawBorder(pGS, borderUI, m_rtUI, &mtRotate); |
| 62 RenderCaption(pGS, &mtRotate); | 62 RenderCaption(pGS, &mtRotate); |
| 63 if (CFX_DIBitmap* pDIBitmap = m_pDataAcc->GetImageEditImage()) { | 63 if (CFX_DIBitmap* pDIBitmap = m_pDataAcc->GetImageEditImage()) { |
| 64 CFX_RectF rtImage; | 64 CFX_RectF rtImage; |
| 65 m_pNormalWidget->GetWidgetRect(rtImage); | 65 m_pNormalWidget->GetWidgetRect(rtImage, false); |
| 66 int32_t iHorzAlign = XFA_ATTRIBUTEENUM_Left; | 66 int32_t iHorzAlign = XFA_ATTRIBUTEENUM_Left; |
| 67 int32_t iVertAlign = XFA_ATTRIBUTEENUM_Top; | 67 int32_t iVertAlign = XFA_ATTRIBUTEENUM_Top; |
| 68 if (CXFA_Para para = m_pDataAcc->GetPara()) { | 68 if (CXFA_Para para = m_pDataAcc->GetPara()) { |
| 69 iHorzAlign = para.GetHorizontalAlign(); | 69 iHorzAlign = para.GetHorizontalAlign(); |
| 70 iVertAlign = para.GetVerticalAlign(); | 70 iVertAlign = para.GetVerticalAlign(); |
| 71 } | 71 } |
| 72 int32_t iAspect = XFA_ATTRIBUTEENUM_Fit; | 72 int32_t iAspect = XFA_ATTRIBUTEENUM_Fit; |
| 73 if (CXFA_Value value = m_pDataAcc->GetFormValue()) { | 73 if (CXFA_Value value = m_pDataAcc->GetFormValue()) { |
| 74 if (CXFA_Image imageObj = value.GetImage()) { | 74 if (CXFA_Image imageObj = value.GetImage()) { |
| 75 iAspect = imageObj.GetAspect(); | 75 iAspect = imageObj.GetAspect(); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 void CXFA_FFImageEdit::OnProcessEvent(CFWL_Event* pEvent) { | 131 void CXFA_FFImageEdit::OnProcessEvent(CFWL_Event* pEvent) { |
| 132 CXFA_FFField::OnProcessEvent(pEvent); | 132 CXFA_FFField::OnProcessEvent(pEvent); |
| 133 m_pOldDelegate->OnProcessEvent(pEvent); | 133 m_pOldDelegate->OnProcessEvent(pEvent); |
| 134 } | 134 } |
| 135 | 135 |
| 136 void CXFA_FFImageEdit::OnDrawWidget(CFX_Graphics* pGraphics, | 136 void CXFA_FFImageEdit::OnDrawWidget(CFX_Graphics* pGraphics, |
| 137 const CFX_Matrix* pMatrix) { | 137 const CFX_Matrix* pMatrix) { |
| 138 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); | 138 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); |
| 139 } | 139 } |
| OLD | NEW |