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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 CFX_Matrix mtRotate; | 54 CFX_Matrix mtRotate; |
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 = m_pNormalWidget->GetWidgetRect(); |
65 m_pNormalWidget->GetWidgetRect(rtImage, false); | |
66 int32_t iHorzAlign = XFA_ATTRIBUTEENUM_Left; | 65 int32_t iHorzAlign = XFA_ATTRIBUTEENUM_Left; |
67 int32_t iVertAlign = XFA_ATTRIBUTEENUM_Top; | 66 int32_t iVertAlign = XFA_ATTRIBUTEENUM_Top; |
68 if (CXFA_Para para = m_pDataAcc->GetPara()) { | 67 if (CXFA_Para para = m_pDataAcc->GetPara()) { |
69 iHorzAlign = para.GetHorizontalAlign(); | 68 iHorzAlign = para.GetHorizontalAlign(); |
70 iVertAlign = para.GetVerticalAlign(); | 69 iVertAlign = para.GetVerticalAlign(); |
71 } | 70 } |
72 int32_t iAspect = XFA_ATTRIBUTEENUM_Fit; | 71 int32_t iAspect = XFA_ATTRIBUTEENUM_Fit; |
73 if (CXFA_Value value = m_pDataAcc->GetFormValue()) { | 72 if (CXFA_Value value = m_pDataAcc->GetFormValue()) { |
74 if (CXFA_Image imageObj = value.GetImage()) { | 73 if (CXFA_Image imageObj = value.GetImage()) { |
75 iAspect = imageObj.GetAspect(); | 74 iAspect = imageObj.GetAspect(); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 129 |
131 void CXFA_FFImageEdit::OnProcessEvent(CFWL_Event* pEvent) { | 130 void CXFA_FFImageEdit::OnProcessEvent(CFWL_Event* pEvent) { |
132 CXFA_FFField::OnProcessEvent(pEvent); | 131 CXFA_FFField::OnProcessEvent(pEvent); |
133 m_pOldDelegate->OnProcessEvent(pEvent); | 132 m_pOldDelegate->OnProcessEvent(pEvent); |
134 } | 133 } |
135 | 134 |
136 void CXFA_FFImageEdit::OnDrawWidget(CFX_Graphics* pGraphics, | 135 void CXFA_FFImageEdit::OnDrawWidget(CFX_Graphics* pGraphics, |
137 const CFX_Matrix* pMatrix) { | 136 const CFX_Matrix* pMatrix) { |
138 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); | 137 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); |
139 } | 138 } |
OLD | NEW |