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/lightwidget/cfwl_picturebox.h" | 7 #include "xfa/fwl/lightwidget/cfwl_picturebox.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 FWL_Error CFWL_PictureBox::SetOffset(FX_FLOAT fx, FX_FLOAT fy) { | 90 FWL_Error CFWL_PictureBox::SetOffset(FX_FLOAT fx, FX_FLOAT fy) { |
91 m_PictureBoxDP.m_fOffSetX = fx; | 91 m_PictureBoxDP.m_fOffSetX = fx; |
92 m_PictureBoxDP.m_fOffSetY = fy; | 92 m_PictureBoxDP.m_fOffSetY = fy; |
93 return FWL_Error::Succeeded; | 93 return FWL_Error::Succeeded; |
94 } | 94 } |
95 | 95 |
96 CFWL_PictureBox::CFWL_PictureBox() {} | 96 CFWL_PictureBox::CFWL_PictureBox() {} |
97 | 97 |
98 CFWL_PictureBox::~CFWL_PictureBox() {} | 98 CFWL_PictureBox::~CFWL_PictureBox() {} |
99 | 99 |
| 100 CFWL_PictureBox::CFWL_PictureBoxDP::CFWL_PictureBoxDP() |
| 101 : m_pBitmap(nullptr), |
| 102 m_iOpacity(0), |
| 103 m_iFlipMode(0), |
| 104 m_fRotation(0.0f), |
| 105 m_fScaleX(1.0f), |
| 106 m_fScaleY(1.0f), |
| 107 m_fOffSetX(0.0f), |
| 108 m_fOffSetY(0.0f) {} |
| 109 |
100 FWL_Error CFWL_PictureBox::CFWL_PictureBoxDP::GetCaption( | 110 FWL_Error CFWL_PictureBox::CFWL_PictureBoxDP::GetCaption( |
101 IFWL_Widget* pWidget, | 111 IFWL_Widget* pWidget, |
102 CFX_WideString& wsCaption) { | 112 CFX_WideString& wsCaption) { |
103 return FWL_Error::Succeeded; | 113 return FWL_Error::Succeeded; |
104 } | 114 } |
105 | 115 |
106 CFX_DIBitmap* CFWL_PictureBox::CFWL_PictureBoxDP::GetPicture( | 116 CFX_DIBitmap* CFWL_PictureBox::CFWL_PictureBoxDP::GetPicture( |
107 IFWL_Widget* pWidget) { | 117 IFWL_Widget* pWidget) { |
108 return m_pBitmap; | 118 return m_pBitmap; |
109 } | 119 } |
(...skipping 23 matching lines...) Expand all Loading... |
133 matrix.Rotate(m_fRotation); | 143 matrix.Rotate(m_fRotation); |
134 matrix.Translate(fLen, fWid); | 144 matrix.Translate(fLen, fWid); |
135 matrix.Scale(m_fScaleX, m_fScaleY); | 145 matrix.Scale(m_fScaleX, m_fScaleY); |
136 matrix.Translate(m_fOffSetX, m_fOffSetY); | 146 matrix.Translate(m_fOffSetX, m_fOffSetY); |
137 return FWL_Error::Succeeded; | 147 return FWL_Error::Succeeded; |
138 } | 148 } |
139 | 149 |
140 int32_t CFWL_PictureBox::CFWL_PictureBoxDP::GetFlipMode(IFWL_Widget* pWidget) { | 150 int32_t CFWL_PictureBox::CFWL_PictureBoxDP::GetFlipMode(IFWL_Widget* pWidget) { |
141 return m_iFlipMode; | 151 return m_iFlipMode; |
142 } | 152 } |
OLD | NEW |