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 "../../../foxitlib.h" | 7 #include "../../../foxitlib.h" |
8 CFWL_PictureBox* CFWL_PictureBox::Create() { | 8 CFWL_PictureBox* CFWL_PictureBox::Create() { |
9 return new CFWL_PictureBox; | 9 return new CFWL_PictureBox; |
10 } | 10 } |
(...skipping 21 matching lines...) Expand all Loading... | |
32 return FWL_ERR_Succeeded; | 32 return FWL_ERR_Succeeded; |
33 } | 33 } |
34 FX_FLOAT CFWL_PictureBox::GetRotation() { | 34 FX_FLOAT CFWL_PictureBox::GetRotation() { |
35 return m_PictureBoxDP.m_fRotation; | 35 return m_PictureBoxDP.m_fRotation; |
36 } | 36 } |
37 FWL_ERR CFWL_PictureBox::SetRotation(FX_FLOAT fRotation) { | 37 FWL_ERR CFWL_PictureBox::SetRotation(FX_FLOAT fRotation) { |
38 m_PictureBoxDP.m_fRotation = fRotation; | 38 m_PictureBoxDP.m_fRotation = fRotation; |
39 return FWL_ERR_Succeeded; | 39 return FWL_ERR_Succeeded; |
40 } | 40 } |
41 int32_t CFWL_PictureBox::GetFlipMode() { | 41 int32_t CFWL_PictureBox::GetFlipMode() { |
42 return m_PictureBoxDP.GetFlipMode((IFWL_Widget*)this); | 42 return m_PictureBoxDP.GetFlipMode(m_pIface); |
Tom Sepez
2015/12/10 22:40:35
yow.
| |
43 } | 43 } |
44 FWL_ERR CFWL_PictureBox::SetFlipMode(int32_t iFlipMode) { | 44 FWL_ERR CFWL_PictureBox::SetFlipMode(int32_t iFlipMode) { |
45 m_PictureBoxDP.m_iFlipMode = iFlipMode; | 45 m_PictureBoxDP.m_iFlipMode = iFlipMode; |
46 return FWL_ERR_Succeeded; | 46 return FWL_ERR_Succeeded; |
47 } | 47 } |
48 int32_t CFWL_PictureBox::GetOpacity() { | 48 int32_t CFWL_PictureBox::GetOpacity() { |
49 return m_PictureBoxDP.GetOpacity((IFWL_Widget*)this); | 49 return m_PictureBoxDP.GetOpacity(m_pIface); |
50 } | 50 } |
51 FWL_ERR CFWL_PictureBox::SetOpacity(int32_t iOpacity) { | 51 FWL_ERR CFWL_PictureBox::SetOpacity(int32_t iOpacity) { |
52 m_PictureBoxDP.m_iOpacity = iOpacity; | 52 m_PictureBoxDP.m_iOpacity = iOpacity; |
53 return FWL_ERR_Succeeded; | 53 return FWL_ERR_Succeeded; |
54 } | 54 } |
55 FWL_ERR CFWL_PictureBox::GetScale(FX_FLOAT& fScaleX, FX_FLOAT& fScaleY) { | 55 FWL_ERR CFWL_PictureBox::GetScale(FX_FLOAT& fScaleX, FX_FLOAT& fScaleY) { |
56 CFX_Matrix matrix; | 56 CFX_Matrix matrix; |
57 m_PictureBoxDP.GetMatrix((IFWL_Widget*)this, matrix); | 57 m_PictureBoxDP.GetMatrix(m_pIface, matrix); |
58 matrix.Scale(fScaleX, fScaleY); | 58 matrix.Scale(fScaleX, fScaleY); |
59 return FWL_ERR_Succeeded; | 59 return FWL_ERR_Succeeded; |
60 } | 60 } |
61 FWL_ERR CFWL_PictureBox::SetScale(FX_FLOAT fScaleX, FX_FLOAT fScaleY) { | 61 FWL_ERR CFWL_PictureBox::SetScale(FX_FLOAT fScaleX, FX_FLOAT fScaleY) { |
62 m_PictureBoxDP.m_fScaleX = fScaleX; | 62 m_PictureBoxDP.m_fScaleX = fScaleX; |
63 m_PictureBoxDP.m_fScaleY = fScaleY; | 63 m_PictureBoxDP.m_fScaleY = fScaleY; |
64 return FWL_ERR_Succeeded; | 64 return FWL_ERR_Succeeded; |
65 } | 65 } |
66 FWL_ERR CFWL_PictureBox::GetOffset(FX_FLOAT& fx, FX_FLOAT& fy) { | 66 FWL_ERR CFWL_PictureBox::GetOffset(FX_FLOAT& fx, FX_FLOAT& fy) { |
67 CFX_Matrix matrix; | 67 CFX_Matrix matrix; |
68 m_PictureBoxDP.GetMatrix((IFWL_Widget*)this, matrix); | 68 m_PictureBoxDP.GetMatrix(m_pIface, matrix); |
69 fx = matrix.e; | 69 fx = matrix.e; |
70 fy = matrix.f; | 70 fy = matrix.f; |
71 return FWL_ERR_Succeeded; | 71 return FWL_ERR_Succeeded; |
72 } | 72 } |
73 FWL_ERR CFWL_PictureBox::SetOffset(FX_FLOAT fx, FX_FLOAT fy) { | 73 FWL_ERR CFWL_PictureBox::SetOffset(FX_FLOAT fx, FX_FLOAT fy) { |
74 m_PictureBoxDP.m_fOffSetX = fx; | 74 m_PictureBoxDP.m_fOffSetX = fx; |
75 m_PictureBoxDP.m_fOffSetY = fy; | 75 m_PictureBoxDP.m_fOffSetY = fy; |
76 return FWL_ERR_Succeeded; | 76 return FWL_ERR_Succeeded; |
77 } | 77 } |
78 CFWL_PictureBox::CFWL_PictureBox() {} | 78 CFWL_PictureBox::CFWL_PictureBox() {} |
(...skipping 28 matching lines...) Expand all Loading... | |
107 matrix.Translate(-fLen, -fWid); | 107 matrix.Translate(-fLen, -fWid); |
108 matrix.Rotate(m_fRotation); | 108 matrix.Rotate(m_fRotation); |
109 matrix.Translate(fLen, fWid); | 109 matrix.Translate(fLen, fWid); |
110 matrix.Scale(m_fScaleX, m_fScaleY); | 110 matrix.Scale(m_fScaleX, m_fScaleY); |
111 matrix.Translate(m_fOffSetX, m_fOffSetY); | 111 matrix.Translate(m_fOffSetX, m_fOffSetY); |
112 return FWL_ERR_Succeeded; | 112 return FWL_ERR_Succeeded; |
113 } | 113 } |
114 int32_t CFWL_PictureBox::CFWL_PictureBoxDP::GetFlipMode(IFWL_Widget* pWidget) { | 114 int32_t CFWL_PictureBox::CFWL_PictureBoxDP::GetFlipMode(IFWL_Widget* pWidget) { |
115 return m_iFlipMode; | 115 return m_iFlipMode; |
116 } | 116 } |
OLD | NEW |