| 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/fwl/core/cfwl_picturebox.h" | 7 #include "xfa/fwl/core/cfwl_picturebox.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 } | 107 } |
| 108 | 108 |
| 109 CFX_DIBitmap* CFWL_PictureBox::GetInitialPicture(IFWL_Widget* pWidget) { | 109 CFX_DIBitmap* CFWL_PictureBox::GetInitialPicture(IFWL_Widget* pWidget) { |
| 110 return m_pBitmap; | 110 return m_pBitmap; |
| 111 } | 111 } |
| 112 | 112 |
| 113 int32_t CFWL_PictureBox::GetOpacity(IFWL_Widget* pWidget) { | 113 int32_t CFWL_PictureBox::GetOpacity(IFWL_Widget* pWidget) { |
| 114 return m_iOpacity; | 114 return m_iOpacity; |
| 115 } | 115 } |
| 116 | 116 |
| 117 FWL_Error CFWL_PictureBox::GetMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) { | 117 void CFWL_PictureBox::GetMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) { |
| 118 CFX_RectF rect; | 118 CFX_RectF rect; |
| 119 pWidget->GetClientRect(rect); | 119 pWidget->GetClientRect(rect); |
| 120 FX_FLOAT fLen = rect.width / 2; | 120 FX_FLOAT fLen = rect.width / 2; |
| 121 FX_FLOAT fWid = rect.height / 2; | 121 FX_FLOAT fWid = rect.height / 2; |
| 122 matrix.SetIdentity(); | 122 matrix.SetIdentity(); |
| 123 matrix.Translate(-fLen, -fWid); | 123 matrix.Translate(-fLen, -fWid); |
| 124 matrix.Rotate(m_fRotation); | 124 matrix.Rotate(m_fRotation); |
| 125 matrix.Translate(fLen, fWid); | 125 matrix.Translate(fLen, fWid); |
| 126 matrix.Scale(m_fScaleX, m_fScaleY); | 126 matrix.Scale(m_fScaleX, m_fScaleY); |
| 127 matrix.Translate(m_fOffSetX, m_fOffSetY); | 127 matrix.Translate(m_fOffSetX, m_fOffSetY); |
| 128 return FWL_Error::Succeeded; | |
| 129 } | 128 } |
| 130 | 129 |
| 131 int32_t CFWL_PictureBox::GetFlipMode(IFWL_Widget* pWidget) { | 130 int32_t CFWL_PictureBox::GetFlipMode(IFWL_Widget* pWidget) { |
| 132 return m_iFlipMode; | 131 return m_iFlipMode; |
| 133 } | 132 } |
| OLD | NEW |